public void Start() { LogConfigurator.ConfigureForService(); Log.Information("Viaduc service is starting"); var containerBuilder = ContainerConfigurator.Configure(); BusConfigurator.ConfigureBus(containerBuilder, MonitoredServices.ViaducService, (cfg, ctx) => { cfg.ReceiveEndpoint(BusConstants.ReadUserInformationQueue, ec => { ec.Consumer(ctx.Resolve <ReadUserInformationConsumer>); } ); cfg.ReceiveEndpoint(BusConstants.ReadStammdatenQueue, ec => { ec.Consumer(ctx.Resolve <ReadStammdatenConsumer>); } ); }); var container = containerBuilder.Build(); bus = container.Resolve <IBusControl>(); bus.Start(); Log.Information("Viaduc service started"); }
public OrderService() { // Configure IoC Container kernel = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); recalcTermineListener = new RecalcTermineListener(kernel.Get <IOrderDataAccess>()); }
public VecteurService() { var url = VecteurSettings.Default.Address.Replace("{MachineName}", Environment.MachineName); webApp = WebApp.Start <Startup>(url); LogConfigurator.ConfigureForService(); }
public OnboardingService() { Startup.Kernel = new StandardKernel(); Startup.Kernel.Load(Assembly.GetExecutingAssembly()); LogConfigurator.ConfigureForService(); dataAccess = new UserDataAccess(DbConnectionSetting.Default.ConnectionString); }
public void Start() { LogConfigurator.ConfigureForService(); Log.Information("Viaduc service is starting"); bus = BusConfigurator.ConfigureBus(MonitoredServices.ViaducService, (cfg, host) => { cfg.ReceiveEndpoint(BusConstants.ReadUserInformationQueue, ec => { ec.Consumer(() => new ReadUserInformationConsumer()); } ); cfg.ReceiveEndpoint(BusConstants.ReadStammdatenQueue, ec => { ec.Consumer(() => new ReadStammdatenConsumer()); } ); }); bus.Start(); Log.Information("Viaduc service started"); }
public RepositoryService() { // Configure IoC Container kernel = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
public HarvestService() { // Configure IoC Container containerBuilder = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
public OnboardingService() { LogConfigurator.ConfigureForService(); dataAccess = new UserDataAccess(DbConnectionSetting.Default.ConnectionString); }
public CacheService() { LogConfigurator.ConfigureForService(); parameterHelper = new ParameterHelper(); }
public AssetService() { // Configure IoC Container builder = ContainerConfigurator.CreateContainerBuilder(); LogConfigurator.ConfigureForService(); }
public ExternalContentService() { // Configure IoC Container containerBuilder = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
public MonitoringService() { // Configure IoC Container builder = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
/// <summary> /// The data feed service uses a timer to poll the mutation queue for any pending changes. /// Pending changes are then put on the bus for further processing. /// </summary> public DataFeedService() { // Configure IoC Container containerBuilder = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
public ExternalContentService() { // Configure IoC Container kernel = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
public NotificationService() { kernel = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
public NotificationService() { containerBuilder = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
public DocumentService() { containerBuilder = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
public RepositoryService() { // Configure IoC Container containerBuilder = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
public ParameterService() { LogConfigurator.ConfigureForService(); }
/// <summary> /// The data feed service uses a timer to poll the mutation queue for any pending changes. /// Pending changes are then put on the bus for further processing. /// </summary> public DataFeedService() { // Configure IoC Container kernel = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
public void Test(string sourceFolder) { try { LogConfigurator.ConfigureForService(); var initClient = CreateJobInitRequestClient(); var extractionClient = CreateDocumentExtractionRequestClient(); var conversionClient = CreateDocumentConversionRequestClient(); var supportedFileTypesClient = CreateSupportedFileTypesRequestClient(); // Create the target ouptut folder as subdirectory. Make sure it is empty var targetFolder = new DirectoryInfo(Path.Combine(sourceFolder, "Output")); if (targetFolder.Exists) { targetFolder.Delete(true); } targetFolder.Create(); var sourceFiles = new DirectoryInfo(sourceFolder).GetFiles("*.*", SearchOption.AllDirectories); var jobs = new List <JobInitRequest>(); foreach (var sourceFile in sourceFiles) { var extractionJob = new JobInitRequest { FileNameWithExtension = sourceFile.FullName, RequestedProcessType = ProcessType.TextExtraction }; var conversionJob = new JobInitRequest { FileNameWithExtension = sourceFile.FullName, RequestedProcessType = ProcessType.Rendering }; jobs.Add(extractionJob); jobs.Add(conversionJob); } // Print out supported file types var conversionSupportedFileTypes = supportedFileTypesClient .Request(new SupportedFileTypesRequest { ProcessType = ProcessType.Rendering }).GetAwaiter().GetResult(); var extractionSupportedFileTypes = supportedFileTypesClient .Request(new SupportedFileTypesRequest { ProcessType = ProcessType.TextExtraction }).GetAwaiter().GetResult(); Console.WriteLine($"Supported types for conversion: {string.Join(", ", conversionSupportedFileTypes.SupportedFileTypes)}"); Console.WriteLine($"Supported types for text extraction: {string.Join(", ", extractionSupportedFileTypes.SupportedFileTypes)}"); Console.WriteLine(""); foreach (var job in jobs) { // Init Job var jobInitResult = initClient.Request(job).GetAwaiter().GetResult(); if (!jobInitResult.IsInvalid) { // Upload File UploadFile(jobInitResult, new FileInfo(job.FileNameWithExtension)); // Start actual job, based on request type switch (job.RequestedProcessType) { case ProcessType.TextExtraction: var extractedText = extractionClient.Request(new ExtractionStartRequest { JobGuid = jobInitResult.JobGuid }) .GetAwaiter().GetResult(); SaveTextExtractionResult(new FileInfo(job.FileNameWithExtension), extractedText.Text, targetFolder); break; case ProcessType.Rendering: var conversionResult = conversionClient.Request(new ConversionStartRequest { JobGuid = jobInitResult.JobGuid, DestinationExtension = GetDestinationBasedOnInput(new FileInfo(job.FileNameWithExtension).Extension) }) .GetAwaiter() .GetResult(); if (!conversionResult.IsInvalid) { DownloadAndStoreFile(conversionResult, targetFolder); } else { Console.WriteLine($"Unable to convert file. Error: {conversionResult.ErrorMessage}"); } break; default: throw new ArgumentOutOfRangeException(); } } } } catch (Exception e) { Console.WriteLine(e); } }
public HarvestService() { // Configure IoC Container kernel = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }
public DocumentService() { kernel = ContainerConfigurator.Configure(); LogConfigurator.ConfigureForService(); }