コード例 #1
0
        public async Task SaveDllCodeGenOfTypeWithEmbeddedType()
        {
            var    tmpPath = Path.Combine(Path.GetTempPath(), "HyparModels");
            string relEmbeddedSchemaTestPath  = RelativeSavedSchemaPath(embeddedSchemaTest, tmpPath, "embeddedSchemaTest.json");
            string relEmbeddedSchemaTestPath2 = RelativeSavedSchemaPath(embeddedSchemaTest2, tmpPath, "embeddedSchemaTest2.json");

            // Save dll for schemas.
            var dllPath = Path.Combine(tmpPath, "userElements.dll");
            var asm2    = await TypeGenerator.GenerateInMemoryAssemblyFromUrisAndSaveAsync(new[] { relEmbeddedSchemaTestPath, relEmbeddedSchemaTestPath2 }, dllPath);

            Assert.True(asm2.Success);
        }