Exemplo n.º 1
0
 /// <summary>
 /// Constructor for the HbsCSharpModelGenerator.
 /// </summary>
 /// <param name="dependencies">Service dependencies parameter class for HbsCSharpModelGenerator.</param>
 /// <param name="handlebarsHelperService">Handlebars helper service.</param>
 /// <param name="handlebarsBlockHelperService">Handlebars block helper service.</param>
 /// <param name="dbContextTemplateService">Template service for DbContext generator.</param>
 /// <param name="entityTypeTemplateService">Template service for the entity types generator.</param>
 /// <param name="entityTypeTransformationService">Service for transforming entity definitions.</param>
 /// <param name="cSharpDbContextGenerator">DbContext generator.</param>
 /// <param name="cSharpEntityTypeGenerator">Entity type generator.</param>
 public HbsTypeScriptModelGenerator(ModelCodeGeneratorDependencies dependencies,
                                    IHbsHelperService handlebarsHelperService,
                                    IHbsBlockHelperService handlebarsBlockHelperService,
                                    IDbContextTemplateService dbContextTemplateService,
                                    IEntityTypeTemplateService entityTypeTemplateService,
                                    IEntityTypeTransformationService entityTypeTransformationService,
                                    ICSharpDbContextGenerator cSharpDbContextGenerator,
                                    ICSharpEntityTypeGenerator cSharpEntityTypeGenerator) : base(dependencies)
 {
     HandlebarsHelperService         = handlebarsHelperService ?? throw new ArgumentNullException(nameof(handlebarsHelperService));
     HandlebarsBlockHelperService    = handlebarsBlockHelperService ?? throw new ArgumentNullException(nameof(handlebarsBlockHelperService));
     DbContextTemplateService        = dbContextTemplateService ?? throw new ArgumentNullException(nameof(dbContextTemplateService));
     EntityTypeTemplateService       = entityTypeTemplateService ?? throw new ArgumentNullException(nameof(entityTypeTemplateService));
     EntityTypeTransformationService = entityTypeTransformationService ?? throw new ArgumentNullException(nameof(entityTypeTransformationService));
     CSharpDbContextGenerator        = cSharpDbContextGenerator ?? throw new ArgumentNullException(nameof(cSharpDbContextGenerator));
     CSharpEntityTypeGenerator       = cSharpEntityTypeGenerator ?? throw new ArgumentNullException(nameof(cSharpEntityTypeGenerator));
 }
 /// <summary>
 /// Constructor for the HbsTypeScriptModelGenerator.
 /// </summary>
 /// <param name="dependencies">Service dependencies parameter class for HbsCSharpModelGenerator.</param>
 /// <param name="cSharpDbContextGenerator">DbContext generator.</param>
 /// <param name="cSharpEntityTypeGenerator">Entity type generator.</param>
 /// <param name="handlebarsHelperService"></param>
 /// <param name="handlebarsBlockHelperService"></param>
 /// <param name="dbContextTemplateService"></param>
 /// <param name="entityTypeTemplateService"></param>
 /// <param name="entityTypeTransformationService"></param>
 public HbsTypeScriptModelGenerator(
     [NotNull] ModelCodeGeneratorDependencies dependencies,
     [NotNull] ICSharpDbContextGenerator cSharpDbContextGenerator,
     [NotNull] ICSharpEntityTypeGenerator cSharpEntityTypeGenerator,
     [NotNull] IHbsHelperService handlebarsHelperService,
     [NotNull] IHbsBlockHelperService handlebarsBlockHelperService,
     [NotNull] IDbContextTemplateService dbContextTemplateService,
     [NotNull] IEntityTypeTemplateService entityTypeTemplateService,
     [NotNull] IEntityTypeTransformationService entityTypeTransformationService)
     : base(dependencies, cSharpDbContextGenerator, cSharpEntityTypeGenerator)
 {
     HandlebarsHelperService         = handlebarsHelperService;
     HandlebarsBlockHelperService    = handlebarsBlockHelperService;
     DbContextTemplateService        = dbContextTemplateService;
     EntityTypeTemplateService       = entityTypeTemplateService;
     EntityTypeTransformationService = entityTypeTransformationService;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Constructor for the HbsCSharpModelGenerator.
 /// </summary>
 /// <param name="dependencies">Service dependencies parameter class for HbsCSharpModelGenerator.</param>
 /// <param name="cSharpDbContextGenerator">DbContext generator.</param>
 /// <param name="cSharpEntityTypeGenerator">Entity type generator.</param>
 /// <param name="handlebarsHelperService">Handlebars helper service.</param>
 /// <param name="handlebarsBlockHelperService">Handlebars block helper service.</param>
 /// <param name="dbContextTemplateService">Template service for DbContext generator.</param>
 /// <param name="entityTypeTemplateService">Template service for the entity types generator.</param>
 /// <param name="entityTypeTransformationService">Service for transforming entity definitions.</param>
 /// <param name="options">Handlebar scaffolding options</param>
 public HbsCSharpModelGenerator(
     [NotNull] ModelCodeGeneratorDependencies dependencies,
     [NotNull] ICSharpDbContextGenerator cSharpDbContextGenerator,
     [NotNull] ICSharpEntityTypeGenerator cSharpEntityTypeGenerator,
     [NotNull] IHbsHelperService handlebarsHelperService,
     [NotNull] IHbsBlockHelperService handlebarsBlockHelperService,
     [NotNull] IDbContextTemplateService dbContextTemplateService,
     [NotNull] IEntityTypeTemplateService entityTypeTemplateService,
     [NotNull] IEntityTypeTransformationService entityTypeTransformationService,
     [NotNull] IOptions <HandlebarsScaffoldingOptions> options)
     : base(dependencies, cSharpDbContextGenerator, cSharpEntityTypeGenerator)
 {
     HandlebarsHelperService         = handlebarsHelperService;
     HandlebarsBlockHelperService    = handlebarsBlockHelperService;
     DbContextTemplateService        = dbContextTemplateService;
     EntityTypeTemplateService       = entityTypeTemplateService;
     EntityTypeTransformationService = entityTypeTransformationService;
     _options = options;
 }