예제 #1
0
파일: SandBox.cs 프로젝트: pdeparcq/dgen
        private async Task GenerateCodeFromModel(string fileName)
        {
            var model       = new StarUmlReader().Read(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), fileName));
            var metaModel   = new MetaModelGenerator().Generate(model);
            var application = new CodeModelGenerator().Generate(metaModel);

            await new CodeGenerator(new CSharpCodeGenerator()).Generate(application, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
        }
예제 #2
0
파일: Generator.cs 프로젝트: pdeparcq/dgen
 public Generator(
     ILogger <Generator> logger,
     StarUmlReader starUmlReader,
     MetaModelGenerator metaModelGenerator,
     CodeModelGenerator codeModelGenerator,
     CodeGenerator codeGenerator)
 {
     _logger             = logger;
     _starUmlReader      = starUmlReader;
     _metaModelGenerator = metaModelGenerator;
     _codeModelGenerator = codeModelGenerator;
     _codeGenerator      = codeGenerator;
 }