/**@}*/ #endregion #region Order comparison /*! \name Order comparison */ /**@{*/ /// <summary> /// Generic IComparable implementation (default) for comparing AcProperty objects. /// Sorts by [[depot, stream] | principal] name then property name. /// </summary> /// <param name="other">An AcProperty object to compare with this instance.</param> /// <returns>Value indicating the relative order of the AcProperty objects being compared.</returns> /*! \sa [AcProperties constructor example](@ref AcUtils#AcProperties#AcProperties) */ public int CompareTo(AcProperty other) { int result = 0; if (AcProperty.ReferenceEquals(this, other)) { result = 0; } else { if (Depot != null && other.Depot != null) { result = Depot.CompareTo(other.Depot); } if (result == 0) { result = String.Compare(Name, other.Name); } if (result == 0) { result = String.Compare(PropName, other.PropName); } } return(result); }
/**@}*/ #endregion #region Order comparison /*! \name Order comparison */ /**@{*/ /// <summary> /// Generic IComparable implementation (default) for comparing AcWorkspace objects to sort by depot name and then workspace name. /// </summary> /// <param name="other">An AcWorkspace object to compare with this instance.</param> /// <returns>Value indicating the relative order of the AcWorkspace objects being compared.</returns> /*! \sa [AcWorkspaces constructor](@ref AcUtils#AcWorkspaces#AcWorkspaces) */ public int CompareTo(AcWorkspace other) { int result; if (AcWorkspace.ReferenceEquals(this, other)) { result = 0; } else { result = Depot.CompareTo(other.Depot); if (result == 0) { result = Name.CompareTo(other.Name); } } return(result); }