public JsonLocationType(LocationType ConvertedFromLocationType) { this.Key = ConvertedFromLocationType.Key; this.Name = ConvertedFromLocationType.Name; this.Description = ConvertedFromLocationType.Description; this.Icon = ConvertedFromLocationType.Icon; this.Properties = new List<JsonTypeProperty>(); foreach (var Prop in ConvertedFromLocationType.Properties.OrderBy(p => p.SortOrder)) { var JsonProp = new JsonTypeProperty(); JsonProp.PropAlias = Prop.Alias; JsonProp.PropName = Prop.Name; JsonProp.PropType = Prop.DataTypeId; JsonProp.IsDefaultProp = Prop.IsDefaultProp; JsonProp.Key = Prop.Key; JsonProp.SortOrder = Prop.SortOrder; this.Properties.Add(JsonProp); } }
public JsonLocationType(LocationType ConvertedFromLocationType) { this.Key = ConvertedFromLocationType.Key; this.Name = ConvertedFromLocationType.Name; this.Description = ConvertedFromLocationType.Description; this.Icon = ConvertedFromLocationType.Icon; this.Properties = new List <JsonTypeProperty>(); foreach (var Prop in ConvertedFromLocationType.Properties.OrderBy(p => p.SortOrder)) { var JsonProp = new JsonTypeProperty(); JsonProp.PropAlias = Prop.Alias; JsonProp.PropName = Prop.Name; JsonProp.PropType = Prop.DataTypeId; JsonProp.IsDefaultProp = Prop.IsDefaultProp; JsonProp.Key = Prop.Key; JsonProp.SortOrder = Prop.SortOrder; this.Properties.Add(JsonProp); } }
public JsonLocationType GetEmptyJsonLocationType() { var Result = new JsonLocationType(); var EmptyProp = new JsonTypeProperty(); Result.Properties.Add(EmptyProp); return Result; }