Exemplo n.º 1
0
        /// <summary>
        /// Useful in the cases where C# does not realize it should use the implicit conversion operator (such as returning when you need to return a boolean and C# will not accept a WasFound).
        /// </summary>
        public static bool AsBoolean <TResult>(this WasFound <TResult> wasFound)
        {
#pragma warning disable CS0618 // Type or member is obsolete
            return(wasFound.Exists);

#pragma warning restore CS0618 // Type or member is obsolete
        }
Exemplo n.º 2
0
 public static (bool WasFound, TOutput output) ToTuple <TResult, TOutput>(this WasFound <TResult> wasFound, Func <TResult, TOutput> selector)
 {