예제 #1
0
        public static Operation <T> Select <T>(this Operation operation, Func <object, T> process)
        {
            var op1 = new Operation <object>(operation.GetException())
            {
                Message   = operation.Message,
                Result    = null,
                Succeeded = operation.Succeeded
            };

            return(OperationExtensions.Next(op1, process));
        }
예제 #2
0
 public static Operation <U> Select <T, U>(this Operation <T> operation, Func <T, U> process)
 {
     return(OperationExtensions.Next(operation, process));
 }
예제 #3
0
 public static IEnumerable <Operation <V> > SelectMany <T, U, V>(this IEnumerable <T> operation, Func <T, Operation <U> > process, Func <T, U, V> projection)
 {
     return(operation.Select(x => OperationExtensions.Next(process(x), u => projection(x, u))));
 }