示例#1
0
文件: Trigger.cs 项目: hpie/hpie
 /// <summary>
 /// Copies the properties from another <see cref="Trigger"/> the current instance. This will not copy any properties associated with any derived triggers except those supporting the <see cref="ITriggerDelay"/> interface.
 /// </summary>
 /// <param name="sourceTrigger">The source <see cref="Trigger"/>.</param>
 public override void CopyProperties(Trigger sourceTrigger)
 {
     base.CopyProperties(sourceTrigger);
     if (sourceTrigger.GetType() == this.GetType())
     {
         this.DaysOfWeek = ((MonthlyDOWTrigger)sourceTrigger).DaysOfWeek;
         this.MonthsOfYear = ((MonthlyDOWTrigger)sourceTrigger).MonthsOfYear;
         try { this.RunOnLastWeekOfMonth = ((MonthlyDOWTrigger)sourceTrigger).RunOnLastWeekOfMonth; } catch { }
         this.WeeksOfMonth = ((MonthlyDOWTrigger)sourceTrigger).WeeksOfMonth;
     }
 }
示例#2
0
文件: Trigger.cs 项目: hpie/hpie
 /// <summary>
 /// Copies the properties from another <see cref="Trigger"/> the current instance. This will not copy any properties associated with any derived triggers except those supporting the <see cref="ITriggerDelay"/> interface.
 /// </summary>
 /// <param name="sourceTrigger">The source <see cref="Trigger"/>.</param>
 public override void CopyProperties(Trigger sourceTrigger)
 {
     base.CopyProperties(sourceTrigger);
     if (sourceTrigger.GetType() == this.GetType())
     {
         this.DaysInterval = ((DailyTrigger)sourceTrigger).DaysInterval;
     }
 }
示例#3
0
文件: Trigger.cs 项目: hpie/hpie
 /// <summary>
 /// Copies the properties from another <see cref="Trigger"/> the current instance. This will not copy any properties associated with any derived triggers except those supporting the <see cref="ITriggerDelay"/> interface.
 /// </summary>
 /// <param name="sourceTrigger">The source <see cref="Trigger"/>.</param>
 public override void CopyProperties(Trigger sourceTrigger)
 {
     base.CopyProperties(sourceTrigger);
     if (sourceTrigger.GetType() == this.GetType())
     {
         this.Subscription = ((EventTrigger)sourceTrigger).Subscription;
         ((EventTrigger)sourceTrigger).ValueQueries.CopyTo(this.ValueQueries);
     }
 }
示例#4
0
文件: Trigger.cs 项目: hpie/hpie
 /// <summary>
 /// Copies the properties from another <see cref="Trigger"/> the current instance. This will not copy any properties associated with any derived triggers except those supporting the <see cref="ITriggerDelay"/> interface.
 /// </summary>
 /// <param name="sourceTrigger">The source <see cref="Trigger"/>.</param>
 public override void CopyProperties(Trigger sourceTrigger)
 {
     base.CopyProperties(sourceTrigger);
     if (sourceTrigger.GetType() == this.GetType())
         this.StateChange = ((SessionStateChangeTrigger)sourceTrigger).StateChange;
 }