Пример #1
0
 public GetResponse <TRet> BubbleResult <TRet>(TRet item)
 {
     if (Exception != null)
     {
         return(GetResponse <TRet> .Fail(item, Exception));
     }
     return(GetResponse <TRet> .Create(successful : Succeeded, val : item, reason : Reason));
 }
Пример #2
0
 public static GetResponse <T> CreateGetResponse <T>(
     ISpecimenContext context,
     bool successful)
 {
     return(GetResponse <T> .Create(
                successful : successful,
                successful?context.Create <T>() : default(T),
                    context.Create <string>()));
 }