Ejemplo n.º 1
0
        public Generator(GeneratorOptions options, ILogger logger = null)
        {
            Requires.NotNull(options, nameof(options));

            _generationContext    = new GenerationContext();
            FileContentGenerated += OnFileContentGenerated;

            Options = options;
            Logger  = logger;

            var generatorOptionsProvider = new GeneratorOptionsProvider {
                GeneratorOptions = options
            };

            var internalStorage = new InternalStorage();

            _fileSystem            = new FileSystem();
            _metadataReaderFactory = new MetadataReaderFactory();
            _typeService           = new TypeService(_metadataReaderFactory, generatorOptionsProvider);
            _typeDependencyService = new TypeDependencyService(_typeService, _metadataReaderFactory);
            _templateService       = new TemplateService(internalStorage, generatorOptionsProvider);

            _tsContentGenerator = new TsContentGenerator(_typeDependencyService,
                                                         _typeService,
                                                         _templateService,
                                                         new TsContentParser(_fileSystem),
                                                         _metadataReaderFactory,
                                                         generatorOptionsProvider,
                                                         logger);
        }
Ejemplo n.º 2
0
 public TsContentGenerator(ITypeDependencyService typeDependencyService,
                           ITypeService typeService,
                           ITemplateService templateService,
                           ITsContentParser tsContentParser)
 {
     _typeDependencyService = typeDependencyService;
     _typeService           = typeService;
     _templateService       = templateService;
     _tsContentParser       = tsContentParser;
 }
Ejemplo n.º 3
0
 public TsContentGenerator(ITypeDependencyService typeDependencyService,
                           ITypeService typeService,
                           ITemplateService templateService,
                           ITsContentParser tsContentParser,
                           IMetadataReader metadataReader)
 {
     _typeDependencyService = typeDependencyService;
     _typeService           = typeService;
     _templateService       = templateService;
     _tsContentParser       = tsContentParser;
     _metadataReader        = metadataReader;
 }
Ejemplo n.º 4
0
 public TsContentGenerator(ITypeDependencyService typeDependencyService,
                           ITypeService typeService,
                           ITemplateService templateService,
                           ITsContentParser tsContentParser,
                           IMetadataReaderFactory metadataReaderFactory,
                           IGeneratorOptionsProvider generatorOptionsProvider,
                           ILogger logger)
 {
     _typeDependencyService    = typeDependencyService;
     _typeService              = typeService;
     _templateService          = templateService;
     _tsContentParser          = tsContentParser;
     _metadataReaderFactory    = metadataReaderFactory;
     _generatorOptionsProvider = generatorOptionsProvider;
     _logger = logger;
 }