コード例 #1
0
 /// <summary>
 /// Create api model from service model
 /// </summary>
 /// <param name="model"></param>
 public LocalizedTextApiModel(LocalizedTextModel model)
 {
     if (model == null)
     {
         throw new ArgumentNullException(nameof(model));
     }
     Locale = model.Locale;
     Text   = model.Text;
 }
コード例 #2
0
 /// <summary>
 /// Clone
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static LocalizedTextModel Clone(this LocalizedTextModel model)
 {
     if (model == null)
     {
         return(null);
     }
     return(new LocalizedTextModel {
         Locale = model.Locale,
         Text = model.Text
     });
 }