public static SchemaAttributeResponse ToDomain(this Model.SchemaAttribute attr) { if (attr == null) { throw new ArgumentNullException(nameof(attr)); } var result = new SchemaAttributeResponse(); SetData(result, attr); return(result); }
public static void SetData(this SchemaAttributeResponse resp, Model.SchemaAttribute attr) { resp.Id = attr.Id; resp.CaseExact = attr.CaseExact; resp.Description = attr.Description; resp.MultiValued = attr.MultiValued; resp.Name = attr.Name; resp.Required = attr.Required; resp.Mutability = attr.Mutability; resp.Returned = attr.Returned; resp.Type = attr.Type; resp.Uniqueness = attr.Uniqueness; resp.CanonicalValues = SplitList(attr.CanonicalValues); resp.ReferenceTypes = SplitList(attr.ReferenceTypes); }