/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="ProviderAuthenticationData1">A provider authentication data.</param> /// <param name="ProviderAuthenticationData2">Another provider authentication data.</param> /// <returns>true|false</returns> public static Boolean operator >(ProviderAuthenticationData ProviderAuthenticationData1, ProviderAuthenticationData ProviderAuthenticationData2) { if ((Object)ProviderAuthenticationData1 == null) { throw new ArgumentNullException(nameof(ProviderAuthenticationData1), "The given ProviderAuthenticationData1 must not be null!"); } return(ProviderAuthenticationData1.CompareTo(ProviderAuthenticationData2) > 0); }
/// <summary> /// Compares two provider authentication data for equality. /// </summary> /// <param name="ProviderAuthenticationData1">A push authentication data request.</param> /// <param name="ProviderAuthenticationData2">Another push authentication data request.</param> /// <returns>True if both match; False otherwise.</returns> public static Boolean operator ==(ProviderAuthenticationData ProviderAuthenticationData1, ProviderAuthenticationData ProviderAuthenticationData2) { // If both are null, or both are same instance, return true. if (ReferenceEquals(ProviderAuthenticationData1, ProviderAuthenticationData2)) { return(true); } // If one is null, but not both, return false. if (((Object)ProviderAuthenticationData1 == null) || ((Object)ProviderAuthenticationData2 == null)) { return(false); } return(ProviderAuthenticationData1.Equals(ProviderAuthenticationData2)); }