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


C# ITrigger类代码示例

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


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

示例1: TriggerComplete

        /// <summary>
        /// Called by the <see cref="IScheduler" /> when a <see cref="ITrigger" />
        /// has fired, it's associated <see cref="IJobDetail" />
        /// has been executed, and it's <see cref="IOperableTrigger.Triggered" /> method has been
        /// called.
        /// </summary>
        /// <param name="trigger"></param>
        /// <param name="context"></param>
        /// <param name="triggerInstructionCode"></param>
        public void TriggerComplete(ITrigger trigger, IJobExecutionContext context, SchedulerInstruction triggerInstructionCode)
        {
            Logger.InfoFormat("TriggerComplete: {0}, {1}", trigger.Key.Name, trigger.Key.Group);

            var auditLog = GetAuditLog(trigger, "TriggerComplete", context);
            _persistanceStore.InsertAuditLog(auditLog);
        }
开发者ID:R-Suite,项目名称:R.Scheduler,代码行数:16,代码来源:AuditTriggerListener.cs

示例2: AlarmBase

 /// <summary>
 /// Initializes a new instance of the AlarmBase class.
 /// </summary>
 /// <param name="action">Alarm action that should be triggered</param>
 /// <param name="trigger">Trigger for this alarm</param>
 protected AlarmBase(AlarmAction action, ITrigger trigger)
     : base(VersitObjectType.VALARM)
 {
     this.Fields.Add(new Property<AlarmAction>("ACTION", action));
     this.Fields.Add(new Duration("DURATION"));
     this.Fields.Add(trigger);
 }
开发者ID:kingzog,项目名称:4vlib,代码行数:12,代码来源:AlarmBase.cs

示例3: TriggerMisfired

        /// <summary>
        /// Called by the Scheduler when a <see cref="ITrigger" /> has misfired.
        /// </summary>
        /// <param name="trigger"></param>
        public void TriggerMisfired(ITrigger trigger)
        {
            Logger.InfoFormat("TriggerMisfired: {0}, {1}", trigger.Key.Name, trigger.Key.Group);

            var auditLog = GetAuditLog(trigger, "TriggerMisfired");
            _persistanceStore.InsertAuditLog(auditLog);
        }
开发者ID:R-Suite,项目名称:R.Scheduler,代码行数:11,代码来源:AuditTriggerListener.cs

示例4: TriggerFired

 public override void TriggerFired(ITrigger trigger, IJobExecutionContext context)
 {
     Log.DebugFormat("Trigger fired for job: {0} trigger key: {1}",
         context.JobDetail.JobType,
         trigger.Key.Name
     );
 }
开发者ID:mattgwagner,项目名称:Task-Processor,代码行数:7,代码来源:TriggerListener.cs

示例5: MeetsCriteria

        public bool MeetsCriteria(ITrigger trigger, object criteria)
        {
            Contract.Requires<ArgumentNullException>(trigger != null);
            Contract.Requires<ArgumentNullException>(criteria != null);

            throw new NotImplementedException();
        }
开发者ID:gordonc64,项目名称:AOtomation.Domain,代码行数:7,代码来源:IHandleTrigger.cs

示例6: TriggerComplete

 public override void TriggerComplete(ITrigger trigger, IJobExecutionContext context, SchedulerInstruction triggerInstructionCode)
 {
     Log.TraceFormat("Trigger complete for job {0} with scheduler instruction {1}",
         context.JobDetail.JobType,
         triggerInstructionCode
     );
 }
开发者ID:mattgwagner,项目名称:Task-Processor,代码行数:7,代码来源:TriggerListener.cs

示例7: RemoveTrigger

 public void RemoveTrigger(string authKey, ITrigger trigger)
 {
     var profile = _profileRepository.GetProfile(authKey);
     var triggerToRemove = profile.Triggers.Single(x => x.Id == trigger.Id);
     profile.Triggers.Remove(triggerToRemove);
     _profileRepository.Update(profile);
 }
开发者ID:AcklenAvenue,项目名称:GeoTriggers,代码行数:7,代码来源:TriggerService.cs

示例8: SetNextTrigger

        private void SetNextTrigger(string id, ITrigger trigger, SchedulerCallback callback)
        {
            var milliSeconds = GetMilliSecondsToNextTrigger(trigger);

            bool isNotIntermediateCallback = true;
            long max = int.MaxValue * 2L;
            if (milliSeconds > max)
            {
                isNotIntermediateCallback = false;
                milliSeconds = max;
            }

            TimerCallback timerCallback = s =>
            {
                if (TimerIsNotCancelled(id))
                {
                    if (isNotIntermediateCallback)
                    {
                        InvokeCallbackAndSetNextTrigger(id, trigger, callback);
                    }
                    else
                    {
                        SetNextTrigger(id, trigger, callback);
                    }
                }
            };

            timers[id] = new System.Threading.Timer(timerCallback, null, milliSeconds, Timeout.Infinite);
        }
开发者ID:robstoll,项目名称:TaskScheduler,代码行数:29,代码来源:ThreadingTimerScheduler.cs

示例9: TriggerFired

        /// <summary>
        /// Called by the Scheduler when a <see cref="ITrigger" /> has fired, 
        /// and it's associated JobDetail is about to be executed.
        /// </summary>
        /// <param name="trigger"></param>
        /// <param name="context"></param>
        public void TriggerFired(ITrigger trigger, IJobExecutionContext context)
        {
            Logger.InfoFormat("TriggerFired: {0}, {1}", trigger.Key.Name, trigger.Key.Group);

            var auditLog = GetAuditLog(trigger, "TriggerFired", context);
            _persistanceStore.InsertAuditLog(auditLog);
        }
开发者ID:R-Suite,项目名称:R.Scheduler,代码行数:13,代码来源:AuditTriggerListener.cs

示例10: WithTrigger

        public ConditionalTrigger WithTrigger(ITrigger trigger)
        {
            if (trigger == null) throw new ArgumentNullException(nameof(trigger));

            trigger.Attach(ForwardTriggerEvent);
            return this;
        }
开发者ID:chkr1011,项目名称:CK.HomeAutomation,代码行数:7,代码来源:ConditionalTrigger.cs

示例11: Create

        public static TriggerDetailDto Create(ITrigger trigger, ICalendar calendar)
        {
            var simpleTrigger = trigger as ISimpleTrigger;
            if (simpleTrigger != null)
            {
                return new SimpleTriggerDetailDto(simpleTrigger, calendar);
            }
            var cronTrigger = trigger as ICronTrigger;
            if (cronTrigger != null)
            {
                return new CronTriggerDetailDto(cronTrigger, calendar);
            }
            var calendarIntervalTrigger = trigger as ICalendarIntervalTrigger;
            if (calendarIntervalTrigger != null)
            {
                return new CalendarIntervalTriggerDetailDto(calendarIntervalTrigger, calendar);
            }
            var dailyTimeIntervalTrigger = trigger as IDailyTimeIntervalTrigger;
            if (dailyTimeIntervalTrigger != null)
            {
                return new DailyTimeIntervalTriggerDetailDto(dailyTimeIntervalTrigger, calendar);
            }

            return new TriggerDetailDto(trigger, calendar);
        }
开发者ID:quartznet,项目名称:quartznet,代码行数:25,代码来源:TriggerDetailDto.cs

示例12: AddTrigger

 public void AddTrigger(ITrigger trigger)
 {
     if (trigger != null)
     {
         this.triggers.Add(trigger);
     }
 }
开发者ID:00erik2,项目名称:Physicist,代码行数:7,代码来源:PhysicistEvent.cs

示例13: Add

 ///////////////////////////////////////////////////////////////////////
 public void Add(ITrigger trigger)
 {
     lock (_triggers) {
         trigger.Fire += SubTrigger_OnFire;
         _triggers.Add(trigger);
     }
 }
开发者ID:jheddings,项目名称:flynn,代码行数:8,代码来源:CompositeTrigger.cs

示例14: ProjectIntegrator

 public ProjectIntegrator(ITrigger trigger, IIntegratable integratable, IProject project)
 {
     _trigger = trigger;
     _project = project;
     _integratable = integratable;
     this.resultManager = project.IntegrationResultManager;
 }
开发者ID:vardars,项目名称:ci-factory,代码行数:7,代码来源:ProjectIntegrator.cs

示例15: UpdateTrigger

 public void UpdateTrigger(string authKey, ITrigger trigger)
 {
     var profile = _profileRepository.GetProfile(authKey);
     var index = profile.Triggers.IndexOf(profile.Triggers.Single(x => x.Id == trigger.Id));
     profile.Triggers[index] = trigger;
     _profileRepository.Update(profile);
 }
开发者ID:AcklenAvenue,项目名称:GeoTriggers,代码行数:7,代码来源:TriggerService.cs


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