public override bool Equals(object obj) { if (obj is SC.Interfaces.DefaultPlugins.ISCTimeSpan) { SC.Interfaces.DefaultPlugins.ISCTimeSpan other = obj as SC.Interfaces.DefaultPlugins.ISCTimeSpan; return(this.Number == other.Number && this.Unit == other.Unit); } return(false); }
public Activation(DateTime startTime, SC.Interfaces.DefaultPlugins.DurationType durationType, SC.Interfaces.DefaultPlugins.ISCTimeSpan duration, SC.Interfaces.DefaultPlugins.ISCTimeSpan repetitionTime) { if (new SCTimeSpan(repetitionTime) > SCTimeSpan.Zero && new SCTimeSpan(repetitionTime) <= new SCTimeSpan(duration)) throw new ArgumentException("Repitition time must be larger than duration"); this.startTime = startTime; this.duration = duration; this.durationType = durationType; this.repetitionTime = repetitionTime; }
public Activation(DateTime startTime, SC.Interfaces.DefaultPlugins.DurationType durationType, SC.Interfaces.DefaultPlugins.ISCTimeSpan duration, SC.Interfaces.DefaultPlugins.ISCTimeSpan repetitionTime) { if (new SCTimeSpan(repetitionTime) > SCTimeSpan.Zero && new SCTimeSpan(repetitionTime) <= new SCTimeSpan(duration)) { throw new ArgumentException("Repitition time must be larger than duration"); } this.startTime = startTime; this.duration = duration; this.durationType = durationType; this.repetitionTime = repetitionTime; }
public SCTimeSpan(SC.Interfaces.DefaultPlugins.ISCTimeSpan ts) : this(ts.Number, ts.Unit) { }
public Activation(DateTime startTime, SC.Interfaces.DefaultPlugins.ISCTimeSpan duration) : this(startTime, SC.Interfaces.DefaultPlugins.DurationType.Duration, duration, new SCTimeSpan()) { }
public Activation(ActivationSettings sett) { duration = new SCTimeSpan(sett.Duration); startTime = sett.StartTime; repetitionTime = new SCTimeSpan(sett.RepetitionTime); }
public Activation(ActivationSettings sett) { duration = new SCTimeSpan(sett.Duration); startTime = sett.StartTime; repetitionTime = new SCTimeSpan(sett.RepetitionTime); }