public BroadcastMainViewModel() { #region Initialising InitBroadcastCommands(); ApplicationInformation = SimpleIoc.Default.GetInstance <ApplicationInformation>(); Customers = new ObservableCollectionEx <T>(); clipboardHelper = new ClipboardHelper <T>(); dialogService = SimpleIoc.Default.GetInstance <IDialogService>(); csvImporter = SimpleIoc.Default.GetInstance <ICsvImporter <T> >(); csvExporter = SimpleIoc.Default.GetInstance <ICsvExporter <T> >(); scheduler = SimpleIoc.Default.GetInstance <IScheduler <T> >(); extensionContainer = SimpleIoc.Default.GetInstance <IExtensionContainer>(); client = SimpleIoc.Default.GetInstance <IClient>(); sync = new object(); #endregion #region Subscribes clipboardHelper.ItemLoaded += ClipboardHelperOnItemLoaded; csvExporter.AllItemSaved += csvExporter_AllItemSaved; csvImporter.ItemLoaded += csvLoader_ItemLoaded; csvImporter.AllItemLoaded += csvImporter_AllItemLoaded; Customers.CollectionChanged += Customers_CollectionChanged; client.ErrorOccurred += ClientOnErrorOccurred; scheduler.WorksCompleted += SchedulerOnWorksCompleted; scheduler.OneWorkCompleted += SchedulerOneWorkCompleted; #endregion }
public GetEventsExportQueryHandler(IMapper mapper, IAsyncRepository <Event> eventRepository, ICsvExporter csvExporter) { _mapper = mapper; _eventRepository = eventRepository; _csvExporter = csvExporter; }
public POCViewModel(IWebSocketClient client, string clientName, BoundingBoxRequest bbr, string clientIndex) { this.client = client; this.ClientName = clientName; IDToEntity = new Dictionary <string, Entity>(); triggerStatisticsCollector = new NumberStatisticsCollector(); redisStatisticsCollector = new NumberStatisticsCollector(); entitiesAmountStatisticsCollector = new NumberStatisticsCollector(); csvExporter = new CsvHelperCsvExporter(clientIndex); generator = new ZoomChangeGenerator(this, bbr); generator.Start(); workQueue = new BlockingCollection <DistributionWorkItem>(); workers = new List <DistributionWorker>(); for (int i = 0; i < ConfigData.Instance.Workers; i++) { var worker = new DistributionWorker(client, triggerStatisticsCollector, redisStatisticsCollector, entitiesAmountStatisticsCollector, workQueue); workers.Add(worker); worker.Start(); } }
public static IEnumerable <IEnumerable <string> > Export <TEntity>(this ICsvExporter <TEntity> exporter, IEnumerable <TEntity> entities) where TEntity : IEntity { yield return(exporter.Headers); foreach (TEntity entity in entities) { yield return(exporter.GetRow(entity)); } }
public GetEventsExportQueryHandler(IAsyncRepository <Event> eventRepository, IMapper mapper, ICsvExporter exporter) { _eventReposiotry = eventRepository; _mapper = mapper; _csvExproter = exporter; }
public GetEventExportQueryHandler(IAsyncRepository <Event> asyncRepository, IMapper mapper, ICsvExporter csvExporter) { _asyncRepository = asyncRepository; _mapper = mapper; _csvExporter = csvExporter; }
public BalanceExportService(IBalanceRepository balanceRepository, ICsvExporter balanceExporter) { _balanceRepository = balanceRepository; _csvExporter = balanceExporter; }
public GetEventsExportQueryHandler(IMapper mapper, IAsyncRepository <Event> eventRepository, ICsvExporter csvExporter) { _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _eventRepository = eventRepository ?? throw new ArgumentNullException(nameof(eventRepository)); _csvExporter = csvExporter ?? throw new ArgumentNullException(nameof(csvExporter)); }
public ExportGetListDataBesesQueryHandler(IMapper mapper, IAsyncRepository <DataBase> dataBaseRepository, ICsvExporter csvExporter) { _mapper = mapper; _dataBaseRepository = dataBaseRepository; _csvExporter = csvExporter; }
public GetTransactionExportQueryHandler(IMapper mapper, ITransactionRepository transactionRepository, ICsvExporter csvExporter) { _mapper = mapper; _transactionRepository = transactionRepository; _csvExporter = csvExporter; }
public GetExpenseClaimsExportQueryHandler(IMapper mapper, IAsyncRepository <ExpenseClaim> expenseClaimRepository, ICsvExporter csvExporter) { _mapper = mapper; _expenseClaimRepository = expenseClaimRepository; _csvExporter = csvExporter; }