/// <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; } }
/// <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; } }
/// <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; }