• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ITrigger类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: SlideshowState

        public SlideshowState(string name, OverlayPlugin manager, string folder, ITrigger next, ITrigger prev, IFeatureTransitionFactory transition, double fadeLengthMS)
            : base(name, manager)
        {
            AddTrigger(true, next);
            AddTrigger(false, prev);

            mTickListener = new Action(Core_Tick);
        }
开发者ID:JohnMcCaffery,项目名称:Chimera,代码行数:8,代码来源:SlideshowState.cs


示例17: VetoJobExecution

 public bool VetoJobExecution(ITrigger trigger, IJobExecutionContext context)
 {
     if (fireCount >= 3)
     {
         return true;
     }
     return false;
 }
开发者ID:CharlieBP,项目名称:quartznet,代码行数:8,代码来源:SchedulerListenerTest.cs


示例18: OnTrigger

        public static IAction OnTrigger(this IAction action, ITrigger trigger)
        {
            if (action == null) throw new ArgumentNullException(nameof(action));
            if (trigger == null) throw new ArgumentNullException(nameof(trigger));

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


示例19: JobExecutionContext

 internal JobExecutionContext(IScheduler scheduler, IJob job, ITrigger trigger, DateTimeOffset time, CancellationToken cancellationToken)
 {
     _scheduler = scheduler;
     _job = job;
     _trigger = trigger;
     _time = time;
     _cancellationToken = cancellationToken;
 }
开发者ID:rgonek,项目名称:crongadgetry,代码行数:8,代码来源:JobExecutionContext.cs


示例20: EmailAlarm

 /// <summary>
 /// Initializes a new instance of the EmailAlarm class.
 /// </summary>
 /// <param name="trigger">Trigger for this alarm</param>
 /// <param name="summary">Text for the email subject</param>
 /// <param name="description">Text for the email body</param>
 public EmailAlarm(ITrigger trigger, string summary, string description)
     : base(AlarmAction.EMAIL, trigger)
 {
     this.Fields.Add(new Text("DESCRIPTION", description));
     this.Fields.Add(new Text("SUMMARY", summary));
     this.FieldCollections.Add("ATTENDEES", new VPropertyCollection<Attendee>());
     this.FieldCollections.Add("ATTACHMENTS", new VPropertyCollection<IAttachment>());
 }
开发者ID:kingzog,项目名称:4vlib,代码行数:14,代码来源:EmailAlarm.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ITripleStore类代码示例发布时间:2022-05-24
下一篇:
C# ITreeNodeStream类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap