Beispiel #1
0
 /// <summary>
 /// Create to service model
 /// </summary>
 /// <typeparam name="S"></typeparam>
 /// <typeparam name="T"></typeparam>
 /// <param name="model"></param>
 /// <param name="convert"></param>
 public static HistoryReadResultModel <T> ToServiceModel <S, T>(
     this HistoryReadResponseApiModel <S> model, Func <S, T> convert)
 {
     if (model == null)
     {
         return(null);
     }
     return(new HistoryReadResultModel <T> {
         History = convert(model.History),
         ContinuationToken = model.ContinuationToken,
         ErrorInfo = model.ErrorInfo.ToServiceModel()
     });
 }
Beispiel #2
0
 /// <summary>
 /// Convert to service model
 /// </summary>
 /// <param name="model"></param>
 public static HistoryReadResultModel <VariantValue> ToServiceModel(
     this HistoryReadResponseApiModel <VariantValue> model)
 {
     if (model == null)
     {
         return(null);
     }
     return(new HistoryReadResultModel <VariantValue> {
         History = model.History,
         ContinuationToken = model.ContinuationToken,
         ErrorInfo = model.ErrorInfo.ToServiceModel()
     });
 }