public int CompareTo(ChromData other) { if (null == other) { return(1); } var result = Key.CompareTo(other.Key); if (result == 0) { result = ProviderId.CompareTo(other.ProviderId); } return(result); }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="ProviderAuthenticationData">An object to compare with.</param> public Int32 CompareTo(ProviderAuthenticationData ProviderAuthenticationData) { if ((Object)ProviderAuthenticationData == null) { throw new ArgumentNullException(nameof(ProviderAuthenticationData), "The given provider authentication data must not be null!"); } var result = ProviderId.CompareTo(ProviderAuthenticationData.ProviderId); if (result != 0) { return(result); } return(AuthorizationIdentifications.Count().CompareTo(ProviderAuthenticationData.AuthorizationIdentifications.Count())); }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="eMobilityAccountId">An object to compare with.</param> public Int32 CompareTo(eMobilityAccount_Id eMobilityAccountId) { if ((Object)eMobilityAccountId == null) { throw new ArgumentNullException(nameof(eMobilityAccountId), "The given contract identification must not be null!"); } // Compare the length of the contract identifications var _Result = this.Length.CompareTo(eMobilityAccountId.Length); // If equal: Compare charging operator identifications if (_Result == 0) { _Result = ProviderId.CompareTo(eMobilityAccountId.ProviderId); } // If equal: Compare contract identification suffix if (_Result == 0) { _Result = String.Compare(Suffix, eMobilityAccountId.Suffix, StringComparison.Ordinal); } // If equal: Compare contract check digit if (_Result == 0) { if (!CheckDigit.HasValue && !eMobilityAccountId.CheckDigit.HasValue) { _Result = 0; } if (CheckDigit.HasValue && eMobilityAccountId.CheckDigit.HasValue) { _Result = CheckDigit.Value.CompareTo(eMobilityAccountId.CheckDigit.Value); } } return(_Result); }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="eMobilityStationId">An object to compare with.</param> public Int32 CompareTo(eMobilityStation_Id eMobilityStationId) { if ((Object)eMobilityStationId == null) { throw new ArgumentNullException("The given eMobilityStationId must not be null!"); } // Compare the length of the eMobilityStationIds var _Result = this.Length.CompareTo(eMobilityStationId.Length); // If equal: Compare charging operator identifications if (_Result == 0) { _Result = ProviderId.CompareTo(eMobilityStationId.ProviderId); } // If equal: Compare eMobilityStationId suffix if (_Result == 0) { _Result = Suffix.CompareTo(eMobilityStationId.Suffix); } return(_Result); }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="eVehicleId">An object to compare with.</param> public Int32 CompareTo(eVehicle_Id eVehicleId) { if ((Object)eVehicleId == null) { throw new ArgumentNullException(nameof(eVehicleId), "The given electric vehicle identification must not be null!"); } // Compare the length of the eVehicleIds var _Result = this.Length.CompareTo(eVehicleId.Length); // If equal: Compare charging operator identifications if (_Result == 0) { _Result = ProviderId.CompareTo(eVehicleId.ProviderId); } // If equal: Compare eVehicleId suffix if (_Result == 0) { _Result = String.Compare(Suffix, eVehicleId.Suffix, StringComparison.Ordinal); } return(_Result); }