Beispiel #1
0
 public HelpHandler(IDataTransferService service, IInfrastructureConfigurationFactory infrastructureConfigurationFactory,
                    IDataAdapterConfigurationFactory adaptersConfigurationFactory)
 {
     this.service = service;
     this.infrastructureConfigurationFactory = infrastructureConfigurationFactory;
     this.adaptersConfigurationFactory       = adaptersConfigurationFactory;
 }
 public HelpHandler(IDataTransferService service, IInfrastructureConfigurationFactory infrastructureConfigurationFactory,
     IDataAdapterConfigurationFactory adaptersConfigurationFactory)
 {
     this.service = service;
     this.infrastructureConfigurationFactory = infrastructureConfigurationFactory;
     this.adaptersConfigurationFactory = adaptersConfigurationFactory;
 }
 public OneTimeDataTransferHandler(IDataTransferService transferService, IDataAdapterConfigurationFactory dataAdapterConfiguration,
                                   ITransferStatisticsHandler statisticsHandler, IOneTimeDataTransferConfiguration configuration)
 {
     this.transferService          = transferService;
     this.dataAdapterConfiguration = dataAdapterConfiguration;
     this.statisticsHandler        = statisticsHandler;
     this.configuration            = configuration;
 }
        public ImportStep(IDataTransferService transferService, ITransferStatisticsFactory statisticsFactory, IErrorHandler errorHandler, IDataTransferModel transferModel)
            : base(transferModel)
        {
            this.transferService = transferService;
            this.statisticsFactory = statisticsFactory;
            this.errorHandler = errorHandler;

            transferModel.Subscribe(m => m.HasImportStarted, OnImportStateChanged);
        }
        public AdapterSetupStepBase(IDataTransferService transferService, IDataAdapterConfigurationProvidersCollection configurationProviders,
            IDataTransferModel transferModel)
                : base(transferModel)
        {
            TransferService = transferService;
            ConfigurationProviders = configurationProviders;

            transferModel.PropertyChanged += OnTransferModelPropertyChanged;
        }
Beispiel #6
0
        public AdapterSetupStepBase(IDataTransferService transferService, IDataAdapterConfigurationProvidersCollection configurationProviders,
                                    IDataTransferModel transferModel)
            : base(transferModel)
        {
            TransferService        = transferService;
            ConfigurationProviders = configurationProviders;

            transferModel.PropertyChanged += OnTransferModelPropertyChanged;
        }
        public ImportStep(IDataTransferService transferService, ITransferStatisticsFactory statisticsFactory, IErrorHandler errorHandler, IDataTransferModel transferModel)
            : base(transferModel)
        {
            this.transferService   = transferService;
            this.statisticsFactory = statisticsFactory;
            this.errorHandler      = errorHandler;

            transferModel.Subscribe(m => m.HasImportStarted, OnImportStateChanged);
        }
 public OneTimeDataTransferHandler(IDataTransferService transferService, IDataAdapterConfigurationFactory dataAdapterConfiguration,
     IInfrastructureConfigurationFactory infrastructureConfiguration, ITransferStatisticsHandler statisticsHandler, IOneTimeDataTransferConfiguration configuration)
 {
     this.transferService = transferService;
     this.dataAdapterConfiguration = dataAdapterConfiguration;
     this.infrastructureConfiguration = infrastructureConfiguration;
     this.statisticsHandler = statisticsHandler;
     this.configuration = configuration;
 }
Beispiel #9
0
        public void Run()
        {
            var service = XrmCommand.GetService();

            DataTransferService = new DataTransferService(service);
            DataTransferService.SetDefaultProperties();

            var data       = DataTransferService.DataReader.GetDataFromCrm(FetchXml);
            var parsedData = DataTransferService.DataTransformer.TransformDataForFile(data);

            DataTransferService.DataWriter.WriteDataToFile(parsedData, WorkingDirectory);
        }
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="T:com.kiranpatel.crimecluster.webservice.Controllers.IncidentController"/> class.
 /// </summary>
 /// <param name="repository">Repository.</param>
 /// <param name="configService">Config service.</param>
 /// <param name="logger">Logger.</param>
 /// <param name="serialisationService">Serialisation service.</param>
 /// <param name="incidentService">Incident service.</param>
 /// <param name="incidentBacklogService">Incident backlog service.</param>
 /// <param name="mapper">Data Transfer Mapper</param>
 public IncidentController(
     IRepository repository,
     IConfigurationService configService,
     ILogger logger,
     ISerialisationService serialisationService,
     IIncidentService incidentService,
     IIncidentBacklogService incidentBacklogService,
     IDataTransferService <Incident, IncidentDTO> mapper)
     : base(repository, configService, logger, serialisationService)
 {
     this.incidentService        = incidentService;
     this.incidentBacklogService = incidentBacklogService;
     this.mapper = mapper;
 }
Beispiel #11
0
        public MainWindowViewModel(IWorkspaceManager workspaceManager,
                                   IDataTransferService dataTransferService,
                                   IProgressBarService progressBarService,
                                   IDialogService dialogService)
        {
            WorkspaceManager     = workspaceManager;
            _dataTransferService = dataTransferService;
            _progressBarService  = progressBarService;
            _dialogService       = dialogService;

            CreateCommands();

            workspaceManager.WorkspaceSelected += (ws) => SelectedWorkspace = ws;
        }
        public SummaryStep(IDataTransferService transferService, IDataAdapterConfigurationProvidersCollection configurationProviders,
            ICommandLineProvider commandLineProvider, IDataTransferModel transferModel)
                : base(transferModel)
        {
            Guard.NotNull("transferService", transferService);
            Guard.NotNull("configurationProviders", configurationProviders);
            Guard.NotNull("transferModel", transferModel);

            this.transferService = transferService;
            this.configurationProviders = configurationProviders;
            this.commandLineProvider = commandLineProvider;

            transferModel.PropertyChanged += OnTransferModelPropertyChanged;
            OnTransferModelPropertyChanged(this, new PropertyChangedEventArgs(null));
        }
Beispiel #13
0
        public void Initialize()
        {
            _windowService              = A.Fake <IWindowService>();
            _dataTransferService        = A.Fake <IDataTransferService>();
            _clipboardService           = A.Fake <IClipboardService>();
            _httpService                = A.Fake <IHttpService>();
            _schedulerProvider          = A.Fake <ISchedulerProvider>();
            _textToSpeechService        = A.Fake <ITextToSpeechService>();
            _applicationSettingsService = new ApplicationSettingsService(new MockApplicationDataContainer());
            _uiSettingsService          = A.Fake <ISettingsService>();
            _shareDataRepository        = A.Fake <IShareDataRepository>();
            _navigationService          = A.Fake <INavigationService>();

            A.CallTo(() => _schedulerProvider.Default).Returns(_testScheduler);
        }
        public SummaryStep(IDataTransferService transferService, IDataAdapterConfigurationProvidersCollection configurationProviders,
                           ICommandLineProvider commandLineProvider, IDataTransferModel transferModel)
            : base(transferModel)
        {
            Guard.NotNull("transferService", transferService);
            Guard.NotNull("configurationProviders", configurationProviders);
            Guard.NotNull("transferModel", transferModel);

            this.transferService        = transferService;
            this.configurationProviders = configurationProviders;
            this.commandLineProvider    = commandLineProvider;

            transferModel.PropertyChanged += OnTransferModelPropertyChanged;
            OnTransferModelPropertyChanged(this, new PropertyChangedEventArgs(null));
        }
Beispiel #15
0
        public void Run()
        {
            var service = XrmCommand.GetService();

            DataTransferService = new DataTransferService(service);
            DataTransferService.SetDefaultProperties();

            // TODO, read guid map from user input.
            var guidMap    = new Dictionary <Guid, Guid>();
            var data       = DataTransferService.DataReader.ParseDataFromFile(WorkingDirectory);
            var parsedData = DataTransferService.DataTransformer.TransformDataForCrm(data);

            var version = DataTransferService.DataReader.GetCrmVersion();

            DataTransferService.DataWriter.ImportDataToCrm(parsedData, version, guidMap, false, false, false);
        }
        public DataManager(
            IDataTransferService dataTransferService,
            ISurveyService surveyService,
            IStorage storage,
            IDevicesConfigurationProvider configurationProvider)
        {
            this.dataTransferService   = dataTransferService;
            this.surveyService         = surveyService;
            this.storage               = storage;
            this.configurationProvider = configurationProvider;

            this.surveyService.DeviceDataReceived += this.HandleDataReceive;

            this.dataTransferService.WriteRequested  += this.HandleWriteRequest;
            this.dataTransferService.ConfigRequested += this.HandleConfigRequest;
        }
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="T:com.kiranpatel.crimecluster.webservice.Controllers.OfficerController"/> class.
 /// </summary>
 /// <param name="repository">Repository.</param>
 /// <param name="configService">Config service.</param>
 /// <param name="logger">Logger.</param>
 /// <param name="serialisationService">Serialisation service.</param>
 /// <param name="officerService">Officer service.</param>
 /// <param name="locationService">Location service.</param>
 /// <param name="incidentService"Incident service.</param>
 /// <param name="mapper">mapper.</param>
 public OfficerController(
     IRepository repository,
     IConfigurationService configService,
     ILogger logger,
     ISerialisationService serialisationService,
     IOfficerService officerService,
     ILocationService locationService,
     IIncidentService incidentService,
     IIncidentOutcomeService incidentOutcomeService,
     IDataTransferService <Officer, OfficerDTO> mapper)
     : base(repository, configService, logger, serialisationService)
 {
     this.officerService  = officerService;
     this.locationService = locationService;
     this.incidentService = incidentService;
     this.outcomeService  = incidentOutcomeService;
     this.mapper          = mapper;
 }
        public MainPageViewModel(IWindowService windowService,
                                 IDataTransferService dataTransferService,
                                 IClipboardService clipboardService,
                                 IHttpService httpService,
                                 ISchedulerProvider schedulerProvider,
                                 ITextToSpeechService textToSpeechService,
                                 ApplicationSettingsService settingsService,
                                 ISettingsService settingsUiService,
                                 INavigationService navigationService)
        {
            Text = DefineClipboardObservable(windowService.IsVisibleObservable, clipboardService).ToReactiveProperty();

            SelectAllTextTrigger = DefineSelectAllTextTriggerObservable(windowService.IsVisibleObservable, schedulerProvider.Default)
                                   .ToReadonlyReactiveProperty(mode: ReactivePropertyMode.None);

            var formattedStringObservable = DefineFormattedStringObservable(Text);

            var validLinkObservable = DefineValidUriObservable(formattedStringObservable);

            ShareCommand      = validLinkObservable.ToReactiveCommand();
            KeyPressedCommand = validLinkObservable.ToReactiveCommand <object>();

            var enterPressedObservable = DefineEnterPressedObservable(KeyPressedCommand);

            var shareTrigger = DefineShareTrigger(formattedStringObservable, ShareCommand, enterPressedObservable);

            var urlTitleResolveObservable = DefineUrlTitleResolveObservable(shareTrigger, httpService);

            IsInProgress = DefineInProgressObservable(shareTrigger, urlTitleResolveObservable)
                           .ToReadonlyReactiveProperty();

            ErrorMessage = DefineErrorMessageObservable(shareTrigger, urlTitleResolveObservable)
                           .ToReadonlyReactiveProperty();

            _textToSpeechSubscription = DefineTextToSpeachObservable(urlTitleResolveObservable, settingsService, textToSpeechService)
                                        .Subscribe();

            _shareLinkSubscription = urlTitleResolveObservable.ObserveOnUI()
                                     .Subscribe(shareData => ShareLink(dataTransferService, shareData.Title, shareData.Uri));

            SettingsCommand = new DelegateCommand(settingsUiService.ShowSettings);
            HistoryCommand  = new DelegateCommand(() => navigationService.Navigate("History", null));
        }
Beispiel #19
0
        public HistoryPageViewModel(IShareDataRepository shareDataRepository, INavigationService navigationService, IDataTransferService dataTransferService)
        {
            ShareDataList = new ObservableCollection <HistoryItemViewModel>();

            _sharedItemsSubscription = shareDataRepository.ShareDataObservable.Subscribe(AddHistoryItem);

            GoBackCommand  = new DelegateCommand(navigationService.GoBack);
            ReshareCommand = new DelegateCommand <HistoryItemViewModel>(historyItem => ShareLink(dataTransferService, historyItem));
        }
 private static void ShareLink(IDataTransferService transferService, string title, Uri uri)
 {
     transferService.Share(new ShareData(title, uri.ToString()));
 }
Beispiel #21
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IServiceProvider serviceProvider, IDataTransferService dataTransferService)
        {
            if (CommandLineConfiguration.NeedInitLocal)
            {
                dataTransferService.DownloadDataFromMainDatabase();
            }

            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();
            app.UseDefaultFiles();
            app.UseStaticFiles();
            app.UseWebSockets(new WebSocketOptions
            {
                KeepAliveInterval = TimeSpan.FromSeconds(25),
            });
            app.UseCors("ImuaythaiPolicy");

            app.MapWebSocketManager("/ringa", serviceProvider.GetService <RingA>());
            app.MapWebSocketManager("/ringb", serviceProvider.GetService <RingB>());
            app.MapWebSocketManager("/ringc", serviceProvider.GetService <RingC>());

            app.UseAuthentication();

            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "IMuaythai API V1");
            });

            app.ConfigureExceptionMiddleware();

            app.UseMvc();
        }
Beispiel #22
0
 private static void ShareLink(IDataTransferService transferService, HistoryItemViewModel historyItem)
 {
     transferService.Share(historyItem.SharedData);
 }
Beispiel #23
0
 public SinkSetupStep(IDataTransferService transferService, IDataAdapterConfigurationProvidersCollection configurationProviders,
                      IDataTransferModel transferModel)
     : base(transferService, configurationProviders, transferModel)
 {
     Initialize();
 }
 public DataAdapterConfigurationProvidersCollection(IDataTransferService transferService, IEnumerable <IDataAdapterConfigurationProvider> configurationProviders)
 {
     sources = transferService.GetKnownSources();
     sinks   = transferService.GetKnownSinks();
     this.configurationProviders = configurationProviders;
 }
Beispiel #25
0
 public Worker(IDataTransferService service)
 {
     this._service = service;
 }
Beispiel #26
0
 public HelpHandler(IDataTransferService service, IDataAdapterConfigurationFactory configurationFactory)
 {
     this.service = service;
     this.configurationFactory = configurationFactory;
 }
 public DataAdapterConfigurationProvidersCollection(IDataTransferService transferService, IEnumerable<IDataAdapterConfigurationProvider> configurationProviders)
 {
     sources = transferService.GetKnownSources();
     sinks = transferService.GetKnownSinks();
     this.configurationProviders = configurationProviders;
 }