コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        public JsonLocationType GetEmptyJsonLocationType()
        {
            var Result = new JsonLocationType();
            var EmptyProp = new JsonTypeProperty();
            Result.Properties.Add(EmptyProp);

            return Result;
        }