public AnalyticsIndexBuilder( IAnalyticsSearchService analyticsSearchService, ICollectionDataProvider contactSelector, ILoggingService logger, string indexSubmitBatchSize = "1000", string concurrentThreads = "4") : this( analyticsSearchService, contactSelector, logger, int.Parse(indexSubmitBatchSize), int.Parse(concurrentThreads)) { }
public AnalyticsIndexBuilder( IAnalyticsSearchService analyticsSearchService, ICollectionDataProvider contactSelector, ILoggingService logger, int indexSubmitBatchSize = 1000, int concurrentThreads = 4) { if (analyticsSearchService == null) { throw new ArgumentNullException(nameof(analyticsSearchService)); } if (contactSelector == null) { throw new ArgumentNullException(nameof(contactSelector)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } this.AnalyticsSearchService = analyticsSearchService; this.CollectionDataProvider = contactSelector; this.Logger = logger; this.ConcurrentThreads = concurrentThreads; this.addressUpdater = new AddressIndexableUpdater(this.AnalyticsSearchService, this.Logger, indexSubmitBatchSize, this.ConcurrentThreads); this.contactUpdater = new ContactIndexableUpdater(this.AnalyticsSearchService, this.Logger, indexSubmitBatchSize, this.ConcurrentThreads); this.contactTagUpdater = new ContactTagIndexableUpdater(this.AnalyticsSearchService, this.Logger, indexSubmitBatchSize, this.ConcurrentThreads); this.visitUpdater = new VisitIndexableUpdater(this.AnalyticsSearchService, this.Logger, indexSubmitBatchSize, this.ConcurrentThreads); this.visitPageUpdater = new VisitPageIndexableUpdater(this.AnalyticsSearchService, this.Logger, indexSubmitBatchSize, this.ConcurrentThreads); this.visitPageEventUpdater = new VisitPageEventIndexableUpdater(this.AnalyticsSearchService, this.Logger, indexSubmitBatchSize, this.ConcurrentThreads); this.addressUpdater.StatusChanged += this.OnUpdatersStatusChanged; this.contactUpdater.StatusChanged += this.OnUpdatersStatusChanged; this.contactTagUpdater.StatusChanged += this.OnUpdatersStatusChanged; this.visitUpdater.StatusChanged += this.OnUpdatersStatusChanged; this.visitPageUpdater.StatusChanged += this.OnUpdatersStatusChanged; this.visitPageEventUpdater.StatusChanged += this.OnUpdatersStatusChanged; }
public GenericCollectionViewModel(ICollectionDataProvider <B, T> parent) { this._parent = parent; this.Initialize(); this._collection.CollectionChanged += new NotifyCollectionChangedEventHandler(this.CollectionChanged); }