示例#1
0
        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());
        }
示例#2
0
        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();
        }
示例#3
0
 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 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;
 }