Пример #1
0
 /// <summary>
 /// Create api model from service model
 /// </summary>
 /// <param name="model"></param>
 public EnumDescriptionApiModel(EnumDescriptionModel model)
 {
     if (model == null)
     {
         throw new ArgumentNullException(nameof(model));
     }
     EnumDefinition = model.EnumDefinition == null ? null :
                      new EnumDefinitionApiModel(model.EnumDefinition);
     Name        = model.Name;
     BuiltInType = model.BuiltInType;
     DataTypeId  = model.DataTypeId;
 }
Пример #2
0
 /// <summary>
 /// Clone
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static EnumDescriptionModel Clone(this EnumDescriptionModel model)
 {
     if (model == null)
     {
         return(null);
     }
     return(new EnumDescriptionModel {
         BuiltInType = model.BuiltInType,
         Name = model.Name,
         DataTypeId = model.DataTypeId,
         EnumDefinition = model.EnumDefinition.Clone()
     });
 }