예제 #1
0
 public static ServiceResponse <TDataTo> Map <TData, TDataTo>(
     this IServiceResponse <TData> model,
     Func <TData, TDataTo> mapper)
 {
     return((ServiceResponse <TDataTo>)model.WithData(mapper(model.Data)));
 }
예제 #2
0
 public static ServiceResponse <TData> WithData <TData>(
     this IServiceResponse model, TData data)
 {
     return((ServiceResponse <TData>)model.WithData(data));
 }