public override bool OnStart() { //Starting Kernel Trace.TraceInformation("Starting Kernel"); IKernel kernel = new StandardKernel(); this.RegisterServices(kernel); Infra.IoC.Kernel.StartKernel(kernel); Trace.TraceInformation("Kernel Started"); Trace.TraceInformation("Starting Logging"); log4net.Config.XmlConfigurator.Configure(); Trace.TraceInformation("Log Started"); //Starting Listening Queue string connectionString = CloudConfigurationManager.GetSetting("Microsoft.ServiceBus.ConnectionString"); var namespaceManager = NamespaceManager.CreateFromConnectionString(connectionString); if (!namespaceManager.QueueExists(QueueName)) { namespaceManager.CreateQueue(QueueName); } // Initialize the connection to Service Bus Queue Client = QueueClient.CreateFromConnectionString(connectionString, QueueName); Trace.TraceInformation("Starting Process Queue Service"); queueProcessorService = Infra.IoC.Kernel.ResolveService <IQueueProcessorService>(); Trace.TraceInformation("Process Queue Service Started"); return(base.OnStart()); }
public override bool OnStart() { //Starting Kernel Trace.TraceInformation("Starting Kernel"); IKernel kernel = new StandardKernel(); this.RegisterServices(kernel); Infra.IoC.Kernel.StartKernel(kernel); Trace.TraceInformation("Kernel Started"); Trace.TraceInformation("Starting Logging"); log4net.Config.XmlConfigurator.Configure(); Trace.TraceInformation("Log Started"); //Starting Listening Queue string connectionString = CloudConfigurationManager.GetSetting("Microsoft.ServiceBus.ConnectionString"); var namespaceManager = NamespaceManager.CreateFromConnectionString(connectionString); if (!namespaceManager.QueueExists(QueueName)) { namespaceManager.CreateQueue(QueueName); } // Initialize the connection to Service Bus Queue Client = QueueClient.CreateFromConnectionString(connectionString, QueueName); Trace.TraceInformation("Starting Process Queue Service"); queueProcessorService = Infra.IoC.Kernel.ResolveService<IQueueProcessorService>(); Trace.TraceInformation("Process Queue Service Started"); return base.OnStart(); }
public TextTemplateZipProcessor(IExtractZipToDirectoryService extractZipToDirectoryService, IRecursivelyRenameFilesAndFoldersByConvention recursivelyRenameFilesAndFoldersByConvention, ICreateQueueFromPathService createQueueFromPathService, IQueueProcessorService queueProcessorService, IRecursivelyDeleteTtFilesInPathService recursivelyDeleteTtFilesInPathService) { this.recursivelyDeleteTtFilesInPathService = recursivelyDeleteTtFilesInPathService; this.queueProcessorService = queueProcessorService; this.createQueueFromPathService = createQueueFromPathService; this.recursivelyRenameFilesAndFoldersByConvention = recursivelyRenameFilesAndFoldersByConvention; this.extractZipToDirectoryService = extractZipToDirectoryService; }
public QueueProcessor(IQueueProcessorService queueProcessorService) { _queueProcessorService = queueProcessorService; }