Ejemplo n.º 1
0
 /// <summary>
 /// Convert to service model
 /// </summary>
 /// <param name="model"></param>
 public static HistoryReadNextResultModel <VariantValue> ToServiceModel(
     this HistoryReadNextResponseApiModel <VariantValue> model)
 {
     if (model == null)
     {
         return(null);
     }
     return(new HistoryReadNextResultModel <VariantValue> {
         History = model.History,
         ContinuationToken = model.ContinuationToken,
         ErrorInfo = model.ErrorInfo.ToServiceModel()
     });
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create from api model
 /// </summary>
 /// <typeparam name="S"></typeparam>
 /// <typeparam name="T"></typeparam>
 /// <param name="model"></param>
 /// <param name="convert"></param>
 public static HistoryReadNextResultModel <T> ToServiceModel <S, T>(
     this HistoryReadNextResponseApiModel <S> model, Func <S, T> convert)
 {
     if (model == null)
     {
         return(null);
     }
     return(new HistoryReadNextResultModel <T> {
         History = convert(model.History),
         ContinuationToken = model.ContinuationToken,
         ErrorInfo = model.ErrorInfo.ToServiceModel()
     });
 }