Esempio n. 1
0
 public static YamlTenant FromModel(Tenant model)
 {
     return(new YamlTenant
     {
         Name = model.Identifier.Name,
         RenamedFrom = model.Identifier.RenamedFrom,
         TenantTagRefs = model.TenantTags.Select(t => t.Name).ToArray().NullIfEmpty(),
         ProjectEnvironmants = YamlPropertyValues.FromModel(model.ProjectEnvironments)
     });
 }
Esempio n. 2
0
 public Tenant ToModel()
 {
     return(new Tenant(ToModelName(),
                       TenantTagRefs.EnsureNotNull().Select(t => new ElementReference(t)).ToArray(),
                       YamlPropertyValues.ToModel(ProjectEnvironmants)));
 }