public int CompareTo(object obj)
        {
            PeriodSpan other = obj as PeriodSpan;

            if (this.ValidFrom != other.ValidFrom)
            {
                return(this.ValidFrom.CompareTo(other.ValidFrom));
            }
            return(this.ValidUpto.CompareTo(other.ValidUpto));
        }
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }
            if (obj == null || this.GetType() != obj.GetType())
            {
                return(false);
            }

            PeriodSpan other = obj as PeriodSpan;

            return(this.isEqualToSpan(other));
        }
 public bool isEqualToSpan(PeriodSpan other)
 {
     return(this.ValidFrom == other.ValidFrom && this.ValidUpto == other.ValidUpto);
 }
Beispiel #4
0
 public GuidesLegal(uint year)
 {
     GuidesPeriod = new PeriodSpan(year);
 }