/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="IdToken1">An id token.</param> /// <param name="IdToken2">Another id token.</param> /// <returns>true|false</returns> public static Boolean operator ==(IdToken IdToken1, IdToken IdToken2) { // If both are null, or both are same instance, return true. if (Object.ReferenceEquals(IdToken1, IdToken2)) { return(true); } // If one is null, but not both, return false. if (((Object)IdToken1 == null) || ((Object)IdToken2 == null)) { return(false); } if ((Object)IdToken1 == null) { throw new ArgumentNullException(nameof(IdToken1), "The given id token must not be null!"); } return(IdToken1.Equals(IdToken2)); }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="IdToken1">A identification token.</param> /// <param name="IdToken2">Another identification token.</param> /// <returns>true|false</returns> public static Boolean operator ==(IdToken IdToken1, IdToken IdToken2) => IdToken1.Equals(IdToken2);