private ResourceManager([NotNull] ISourceFilesProvider sourceFilesProvider, [NotNull] IConfiguration configuration) { Configuration = configuration; _sourceFilesProvider = sourceFilesProvider; TableEntries = ResourceEntities.ObservableSelectMany(entity => entity.Entries); }
private ResourceManager([NotNull] ISourceFilesProvider sourceFilesProvider) { Contract.Requires(sourceFilesProvider != null); _sourceFilesProvider = sourceFilesProvider; _tableEntries = _resourceEntities.ObservableSelectMany(entity => entity.Entries); }
public ResourceViewModel([NotNull] ResourceManager resourceManager, [NotNull] Configuration configuration, [NotNull] ISourceFilesProvider sourceFilesProvider, [NotNull] CodeReferenceTracker codeReferenceTracker, [NotNull] ITracer tracer, [NotNull] PerformanceTracer performanceTracer) { Contract.Requires(resourceManager != null); Contract.Requires(configuration != null); Contract.Requires(sourceFilesProvider != null); Contract.Requires(codeReferenceTracker != null); Contract.Requires(tracer != null); Contract.Requires(performanceTracer != null); _resourceManager = resourceManager; _configuration = configuration; _sourceFilesProvider = sourceFilesProvider; _codeReferenceTracker = codeReferenceTracker; _tracer = tracer; _performanceTracer = performanceTracer; _resourceTableEntiyCountUpdateThrottle = new DispatcherThrottle(() => OnPropertyChanged(nameof(ResourceTableEntryCount))); _resourceTableEntries = _selectedEntities.ObservableSelectMany(entity => entity.Entries); _resourceTableEntries.CollectionChanged += (_, __) => _resourceTableEntiyCountUpdateThrottle.Tick(); _restartFindCodeReferencesThrottle = new DispatcherThrottle(DispatcherPriority.ContextIdle, () => BeginFindCodeReferences(sourceFilesProvider.SourceFiles)); resourceManager.TableEntries.CollectionChanged += (_, __) => _restartFindCodeReferencesThrottle.Tick(); resourceManager.LanguageChanged += ResourceManager_LanguageChanged; }
public ResourceManager(ISourceFilesProvider sourceFilesProvider, IConfiguration configuration, ITracer tracer) { Configuration = configuration; _sourceFilesProvider = sourceFilesProvider; _tracer = tracer; TableEntries = ResourceEntities.ObservableSelectMany(entity => entity.Entries); }
public ResourceViewModel(ResourceManager resourceManager, IConfiguration configuration, ISourceFilesProvider sourceFilesProvider, CodeReferenceTracker codeReferenceTracker, ITracer tracer, PerformanceTracer performanceTracer) { ResourceManager = resourceManager; _configuration = configuration; _sourceFilesProvider = sourceFilesProvider; _codeReferenceTracker = codeReferenceTracker; _tracer = tracer; _performanceTracer = performanceTracer; ResourceTableEntries = SelectedEntities.ObservableSelectMany(entity => entity.Entries); ResourceTableEntries.CollectionChanged += (_, __) => ResourceTableEntries_CollectionChanged(); resourceManager.LanguageChanged += ResourceManager_LanguageChanged; }
private ResourceManager(Configuration configuration, CodeReferenceTracker codeReferenceTracker, ITracer tracer, ISourceFilesProvider sourceFilesProvider, PerformanceTracer performanceTracer) { Contract.Requires(configuration != null); Contract.Requires(codeReferenceTracker != null); Contract.Requires(tracer != null); Contract.Requires(sourceFilesProvider != null); Contract.Requires(performanceTracer != null); _configuration = configuration; _codeReferenceTracker = codeReferenceTracker; _tracer = tracer; _sourceFilesProvider = sourceFilesProvider; _performanceTracer = performanceTracer; _resourceTableEntries = _selectedEntities.ObservableSelectMany(entity => entity.Entries); }
public ResourceViewModel([NotNull] ResourceManager resourceManager, [NotNull] Configuration configuration, [NotNull] ISourceFilesProvider sourceFilesProvider, [NotNull] CodeReferenceTracker codeReferenceTracker, [NotNull] ITracer tracer, [NotNull] PerformanceTracer performanceTracer) { Contract.Requires(resourceManager != null); Contract.Requires(configuration != null); Contract.Requires(sourceFilesProvider != null); Contract.Requires(codeReferenceTracker != null); Contract.Requires(tracer != null); Contract.Requires(performanceTracer != null); ResourceManager = resourceManager; _configuration = configuration; _sourceFilesProvider = sourceFilesProvider; _codeReferenceTracker = codeReferenceTracker; _tracer = tracer; _performanceTracer = performanceTracer; ResourceTableEntries = SelectedEntities.ObservableSelectMany(entity => entity.Entries); ResourceTableEntries.CollectionChanged += (_, __) => ResourceTableEntries_CollectionChanged(); resourceManager.TableEntries.CollectionChanged += (_, __) => BeginFindCodeReferences(); resourceManager.LanguageChanged += ResourceManager_LanguageChanged; }