/// <summary> /// Determines whether two objects of type <see cref="Maybe{T}" /> are equal. /// </summary> /// <returns>true if the specified objects are equal; otherwise, false.</returns> /// <param name="x">The first object to compare.</param> /// <param name="y">The second object to compare.</param> public static bool Equals<T>(Maybe<T> x, Maybe<T> y) { if (x.HasValue != y.HasValue) { return false; } return EqualityComparer<T>.Default.Equals(x.GetValueOrDefault(), y.GetValueOrDefault()); }
internal PropertyChangedAndValueEventArgs(string propertyName, Maybe <TProperty> maybe) : this(propertyName, maybe.GetValueOrDefault(), maybe.HasValue) { }