BO4E.Reporting/CompletenessReport.cs
// ToDo: make it nice.
/// <summary>
///     sorts two completeness reports such that those with earlier reference time are before others
/// </summary>
/// <param name="other"></param>
/// <returns></returns>
sorts two completeness reports such that those with earlier reference time are before others
sorts two completeness reports such that those with earlier reference time are before others
public int CompareTo(CompletenessReport other)
        {
            if (ReferenceTimeFrame == null && other.ReferenceTimeFrame == null) return 0;
            if (ReferenceTimeFrame != null && other.ReferenceTimeFrame == null) return 1;
            if (ReferenceTimeFrame == null && other.ReferenceTimeFrame != null) return -1;
            if (ReferenceTimeFrame != null && other.ReferenceTimeFrame != null)
            {
                if (ReferenceTimeFrame.Startdatum.HasValue && other.ReferenceTimeFrame.Startdatum.HasValue)
                    return Comparer<DateTimeOffset>.Default.Compare(ReferenceTimeFrame.Startdatum.Value,
                        other.ReferenceTimeFrame.Startdatum.Value);
                if (ReferenceTimeFrame.Startdatum.HasValue) return 1;
                return -1;
            }
            return 0;
        }
public int CompareTo ( CompletenessReport other ) { if ( ReferenceTimeFrame == null && other . ReferenceTimeFrame == null ) return 0 ; if ( ReferenceTimeFrame != null && other . ReferenceTimeFrame == null ) return 1 ; if ( ReferenceTimeFrame == null && other . ReferenceTimeFrame != null ) return - 1 ; if ( ReferenceTimeFrame != null && other . ReferenceTimeFrame != null ) { if ( ReferenceTimeFrame . Startdatum . HasValue && other . ReferenceTimeFrame . Startdatum . HasValue ) return Comparer < DateTimeOffset > . Default . Compare ( ReferenceTimeFrame . Startdatum . Value , other . ReferenceTimeFrame . Startdatum . Value ) ; if ( ReferenceTimeFrame . Startdatum . HasValue ) return 1 ; return - 1 ; } return 0 ; }
sorts two completeness reports such that those with earlier reference time are before others
sorts two completeness reports such that those with earlier reference time are before others
None
other
CompletenessReport
None