当前位置: 首页>>代码示例>>C#>>正文


C# IJobDetail类代码示例

本文整理汇总了C#中IJobDetail的典型用法代码示例。如果您正苦于以下问题:C# IJobDetail类的具体用法?C# IJobDetail怎么用?C# IJobDetail使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IJobDetail类属于命名空间,在下文中一共展示了IJobDetail类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: JobAdded

 public void JobAdded(IJobDetail jobDetail)
 {
     foreach (ISchedulerListener listener in listeners)
     {
         listener.JobAdded(jobDetail);
     }
 }
开发者ID:jondhinkle,项目名称:Rock,代码行数:7,代码来源:BroadcastSchedulerListener.cs

示例2: AssignDataMap

 void AssignDataMap(IJobDetail jobDetail, object createObject) {
     if (jobDetail.JobDataMap!= null) {
         var typeInfo = TypesInfo.FindTypeInfo(createObject.GetType());
         var jobDataMap = ((JobDataMap) jobDetail.JobDataMap);
         jobDataMap.Keys.OfType<string>().Each(AssignValue(createObject, jobDataMap, typeInfo));
     }
 }
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:_JobDataMapController.cs

示例3: ScheduleJob

 public static void ScheduleJob(this IScheduler scheduler, IJobDetail jobDetail, string scheduleText, TimeZoneInfo timeZone)
 {
     TextToScheduleFactory factory = new TextToScheduleFactory();
     var english = factory.CreateEnglishParser();
     var results = english.Parse(scheduleText, timeZone);
     results.ScheduleWithJob(scheduler, jobDetail);
 }
开发者ID:amazing-andrew,项目名称:Quartz.TextToSchedule,代码行数:7,代码来源:TextToScheduleExtensions.cs

示例4: JsonJob

 public JsonJob(IJobDetail jobDetail, IList<ITrigger> triggers)
 {
     JobType = jobDetail.JobType.FullName;
     Description = jobDetail.Description;
     Triggers = new List<JsonTrigger>(triggers.Count);
     foreach (var trigger in triggers)
     {
         Triggers.Add(new JsonTrigger(trigger));
     }
 }
开发者ID:GoneFishern,项目名称:QuartzNetFeaturePack,代码行数:10,代码来源:JsonJob.cs

示例5: JobDetailDto

 public JobDetailDto(IJobDetail jobDetail)
 {
     Durable = jobDetail.Durable;
     ConcurrentExecutionDisallowed = jobDetail.ConcurrentExecutionDisallowed;
     Description = jobDetail.Description;
     JobType = jobDetail.JobType.AssemblyQualifiedNameWithoutVersion();
     Name = jobDetail.Key.Name;
     Group = jobDetail.Key.Group;
     PersistJobDataAfterExecution = jobDetail.PersistJobDataAfterExecution;
     RequestsRecovery = jobDetail.RequestsRecovery;
 }
开发者ID:jvilalta,项目名称:quartznet,代码行数:11,代码来源:JobDetailDto.cs

示例6: CreateJob

        private static void CreateJob()
        {
            // The job builder uses a fluent interface to
            // make it easier to build and generate an
            // IJobDetail object
            _pollingJobDetail = JobBuilder.Create<PollWebsiteJob>()
                .WithIdentity("StartPolling")   // Here we can assign a friendly name to our job
                .Build();                       // And now we build the job detail

            // Put options into data map
            _pollingJobDetail.JobDataMap.Put("Url", _options.Url);
        }
开发者ID:jorik041,项目名称:TheKangarooCourtBackgroundWorker,代码行数:12,代码来源:Program.cs

示例7: InsertExtendedTriggerProperties

        public int InsertExtendedTriggerProperties(ConnectionAndTransactionHolder conn, IOperableTrigger trigger, string state, IJobDetail jobDetail)
        {
            ICronTrigger cronTrigger = (ICronTrigger) trigger;

            using (IDbCommand cmd = DbAccessor.PrepareCommand(conn, AdoJobStoreUtil.ReplaceTablePrefix(StdAdoConstants.SqlInsertCronTrigger, TablePrefix, SchedNameLiteral)))
            {
                DbAccessor.AddCommandParameter(cmd, "triggerName", trigger.Key.Name);
                DbAccessor.AddCommandParameter(cmd, "triggerGroup", trigger.Key.Group);
                DbAccessor.AddCommandParameter(cmd, "triggerCronExpression", cronTrigger.CronExpressionString);
                DbAccessor.AddCommandParameter(cmd, "triggerTimeZone", cronTrigger.TimeZone.Id);

                return cmd.ExecuteNonQuery();
            }
        }
开发者ID:CharlieBP,项目名称:quartznet,代码行数:14,代码来源:CronTriggerPersistenceDelegate.cs

示例8: TriggerFiredBundle

 /// <summary>
 /// Initializes a new instance of the <see cref="TriggerFiredBundle"/> class.
 /// </summary>
 /// <param name="job">The job.</param>
 /// <param name="trigger">The trigger.</param>
 /// <param name="cal">The calendar.</param>
 /// <param name="jobIsRecovering">if set to <c>true</c> [job is recovering].</param>
 /// <param name="fireTimeUtc">The fire time.</param>
 /// <param name="scheduledFireTimeUtc">The scheduled fire time.</param>
 /// <param name="prevFireTimeUtc">The previous fire time.</param>
 /// <param name="nextFireTimeUtc">The next fire time.</param>
 public TriggerFiredBundle(IJobDetail job, IOperableTrigger trigger, ICalendar cal, bool jobIsRecovering,
     DateTimeOffset? fireTimeUtc,
     DateTimeOffset? scheduledFireTimeUtc,
     DateTimeOffset? prevFireTimeUtc,
     DateTimeOffset? nextFireTimeUtc)
 {
     this.job = job;
     this.trigger = trigger;
     this.cal = cal;
     this.jobIsRecovering = jobIsRecovering;
     this.fireTimeUtc = fireTimeUtc;
     this.scheduledFireTimeUtc = scheduledFireTimeUtc;
     this.prevFireTimeUtc = prevFireTimeUtc;
     this.nextFireTimeUtc = nextFireTimeUtc;
 }
开发者ID:vaskosound,项目名称:FantasyLeagueStats,代码行数:26,代码来源:TriggerFiredBundle.cs

示例9: InsertExtendedTriggerProperties

        public int InsertExtendedTriggerProperties(ConnectionAndTransactionHolder conn, IOperableTrigger trigger, string state, IJobDetail jobDetail)
        {
            ISimpleTrigger simpleTrigger = (ISimpleTrigger) trigger;

            using (IDbCommand cmd = commandAccessor.PrepareCommand(conn, AdoJobStoreUtil.ReplaceTablePrefix(StdAdoConstants.SqlInsertSimpleTrigger, tablePrefix, schedNameLiteral)))
            {
                commandAccessor.AddCommandParameter(cmd, "triggerName", trigger.Key.Name);
                commandAccessor.AddCommandParameter(cmd, "triggerGroup", trigger.Key.Group);
                commandAccessor.AddCommandParameter(cmd, "triggerRepeatCount", simpleTrigger.RepeatCount);
                commandAccessor.AddCommandParameter(cmd, "triggerRepeatInterval", simpleTrigger.RepeatInterval.TotalMilliseconds);
                commandAccessor.AddCommandParameter(cmd, "triggerTimesTriggered", simpleTrigger.TimesTriggered);

                return cmd.ExecuteNonQuery();
            }
        }
开发者ID:neumik,项目名称:quartznet,代码行数:15,代码来源:SimpleTriggerPersistenceDelegate.cs

示例10: StoreJobAndTrigger

 /// <summary>
 /// Store the given <see cref="IJobDetail" /> and <see cref="ITrigger" />.
 /// </summary>
 /// <param name="newJob">The <see cref="IJobDetail" /> to be stored.</param>
 /// <param name="newTrigger">The <see cref="ITrigger" /> to be stored.</param>
 public virtual void StoreJobAndTrigger(IJobDetail newJob, IOperableTrigger newTrigger)
 {
     StoreJob(newJob, false);
     StoreTrigger(newTrigger, false);
 }
开发者ID:KevinVoell,项目名称:quartznet-mongodb,代码行数:10,代码来源:JobStore.cs

示例11: StoreJob

        /// <summary>
        /// Store the given <see cref="IJob" />.
        /// </summary>
        /// <param name="newJob">The <see cref="IJob" /> to be stored.</param>
        /// <param name="replaceExisting">If <see langword="true" />, any <see cref="IJob" /> existing in the
        /// <see cref="IJobStore" /> with the same name and group should be
        /// over-written.</param>
        public virtual void StoreJob(IJobDetail newJob, bool replaceExisting)
        {
            bool repl = false;

            lock (lockObject)
            {

                if (this.CheckExists(newJob.Key))
                {
                    if (!replaceExisting)
                    {
                        throw new ObjectAlreadyExistsException(newJob);
                    }

                    repl = true;
                }

                if (!repl)
                {
                    // try insert new
                    this.Jobs.Insert(newJob.ToBsonDocument());
                }
                else
                {
                    // force upsert
                    this.Jobs.Save(newJob.ToBsonDocument());
                }
            }
        }
开发者ID:KevinVoell,项目名称:quartznet-mongodb,代码行数:36,代码来源:JobStore.cs

示例12: JobAdded

 public void JobAdded(IJobDetail jobDetail)
 {
 }
开发者ID:CharlieBP,项目名称:quartznet,代码行数:3,代码来源:SchedulerListenerTest.cs

示例13: ScheduleJob

 /// <summary>
 /// Calls the equivalent method on the 'proxied' <see cref="QuartzScheduler" />.
 /// </summary>
 public virtual DateTimeOffset ScheduleJob(IJobDetail jobDetail, ITrigger trigger)
 {
     try
     {
         return GetRemoteScheduler().ScheduleJob(jobDetail, trigger);
     }
     catch (RemotingException re)
     {
         throw InvalidateHandleCreateException("Error communicating with remote scheduler.", re);
     }
 }
开发者ID:neumik,项目名称:quartznet,代码行数:14,代码来源:RemoteScheduler.cs

示例14: AddJob

 /// <summary>
 /// Calls the equivalent method on the 'proxied' <see cref="QuartzScheduler" />.
 /// </summary>
 public virtual void AddJob(IJobDetail jobDetail, bool replace)
 {
     try
     {
         GetRemoteScheduler().AddJob(jobDetail, replace);
     }
     catch (RemotingException re)
     {
         throw InvalidateHandleCreateException("Error communicating with remote scheduler.", re);
     }
 }
开发者ID:neumik,项目名称:quartznet,代码行数:14,代码来源:RemoteScheduler.cs

示例15: ObjectAlreadyExistsException

		/// <summary> <para>
		/// Create a <see cref="ObjectAlreadyExistsException" /> and auto-generate a
		/// message using the name/group from the given <see cref="IJobDetail" />.
		/// </para>
		/// 
		/// <para>
		/// The message will read: <br />"Unable to store Job with name: '__' and
		/// group: '__', because one already exists with this identification."
		/// </para>
		/// </summary>
        public ObjectAlreadyExistsException(IJobDetail offendingJob)
			: base($"Unable to store Job: '{offendingJob.Key}', because one already exists with this identification.")
		{
		}
开发者ID:jvilalta,项目名称:quartznet,代码行数:14,代码来源:ObjectAlreadyExistsException.cs


注:本文中的IJobDetail类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。