コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JobScheduler"/> class.
        /// </summary>
        /// <param name="cloudContext">The cloud context.</param>
        /// <param name="traceSource">The trace source.</param>
        /// <param name="storageAccountFactory">The storage account factory.</param>
        /// <param name="settings">The settings.</param>
		public JobScheduler(string cloudContext, TraceSource traceSource, Func<CloudStorageAccount> storageAccountFactory, Settings settings)
		{
			var container = Bootstrapper.Initialize();
			Func<IAppConfigRepository> repositoryFactory = () => container.Resolve<IAppConfigRepository>();
			_jobConstructor = type=>(IJobActivity)container.Resolve(type, null);
			_settings = settings;
			_cloudContext = cloudContext;
			_cloudStorageAccount = storageAccountFactory();
			_traceSource = traceSource;
			_schedulerDbContext = new SchedulerDbContext(repositoryFactory);
		}
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JobScheduler"/> class.
        /// </summary>
        /// <param name="schedulerDbContext">The scheduler database context.</param>
        /// <param name="jobConstructor">The job constructor.</param>
        /// <param name="cloudContext">The cloud context.</param>
        /// <param name="traceSource">The trace source.</param>
        /// <param name="storageAccountFactory">The storage account factory.</param>
        /// <param name="settings">The settings.</param>
		public JobScheduler(ISchedulerDbContext schedulerDbContext, Func<Type,IJobActivity> jobConstructor, string cloudContext, TraceSource traceSource, Func<CloudStorageAccount> storageAccountFactory, Settings settings)
		{
			_jobConstructor = jobConstructor;
			_settings = settings;
			_cloudContext = cloudContext;
			_cloudStorageAccount = storageAccountFactory();
			_traceSource = traceSource;
			_schedulerDbContext = schedulerDbContext;
		}