コード例 #1
0
        public void GeneratesCodeFromSchema()
        {
            var tmpPath    = Path.GetTempPath();
            var schemaPath = Path.Combine(tmpPath, "beam.json");

            File.WriteAllText(schemaPath, schema);
            var relPath = Path.GetRelativePath(Assembly.GetExecutingAssembly().Location, schemaPath);

            TypeGenerator.GenerateUserElementTypeFromUri(relPath, tmpPath, true);
            var code = File.ReadAllText(Path.Combine(tmpPath, "beam.g.cs"));
        }