예제 #1
0
        public void Init()
        {
            instance = new ConstructionSetAbridged("NewConstructionSet");
            var json =
                @"{
    ""type"": ""ConstructionSetAbridged"",
    ""name"": ""Construction Set"",
    ""wall_set"": {
                ""type"": ""WallSetAbridged"",
        ""exterior_construction"": ""Exterior Wall ASHRAE 2009""
    },
    ""floor_set"": {
                ""type"": ""FloorSetAbridged"",
        ""interior_construction"": ""Internal Floor""
    },
    ""roof_ceiling_set"": {
                ""type"": ""RoofCeilingSetAbridged"",
        ""exterior_construction"": ""Exterior Roof ASHRAE 2009""
    },
    ""aperture_set"": {
                ""type"": ""ApertureSetAbridged"",
        ""fixed_window_construction"": ""Exterior Window""
    }
}";

            instanceFromJson = ConstructionSetAbridged.FromJson(json);
        }
        public void Init()
        {
            instance = new ConstructionSetAbridged("NewConstructionSet");
            var url = @"https://raw.githubusercontent.com/ladybug-tools/honeybee-schema/master/samples/construction_set/constructionset_abridged_complete.json";

            using (var wc = new System.Net.WebClient())
            {
                var json = wc.DownloadString(url);
                this.instanceFromJson = ConstructionSetAbridged.FromJson(json);
            }
        }