Beispiel #1
0
        public static bool TryUnwrap <TOutType>(this Optional.Option <TOutType> optional, out TOutType outType) where TOutType : class
        {
            if (optional.HasValue)
            {
                outType = optional.ValueOrFailure();
                return(true);
            }

            outType = default(TOutType);
            return(false);
        }
Beispiel #2
0
 Wrapped DecodeWrapped(Optional.Option <Any> maybeAny)
 {
     return(new WrappedResolvedType().ParseFrom(maybeAny.ValueOrFailure().Value));
 }