/// <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="dbContextTemplateService">Template service for DbContext generator.</param>
 /// <param name="entityTypeTemplateService">Template service for the entity types generator.</param>
 /// <param name="cSharpDbContextGenerator">DbContext generator.</param>
 /// <param name="cSharpEntityTypeGenerator">Entity type generator.</param>
 public HbsCSharpModelGenerator(ModelCodeGeneratorDependencies dependencies,
                                IHbsHelperService handlebarsHelperService,
                                IDbContextTemplateService dbContextTemplateService,
                                IEntityTypeTemplateService entityTypeTemplateService,
                                ICSharpDbContextGenerator cSharpDbContextGenerator,
                                ICSharpEntityTypeGenerator cSharpEntityTypeGenerator) : base(dependencies)
 {
     HandlebarsHelperService   = handlebarsHelperService ?? throw new ArgumentNullException(nameof(handlebarsHelperService));
     DbContextTemplateService  = dbContextTemplateService ?? throw new ArgumentNullException(nameof(dbContextTemplateService));
     EntityTypeTemplateService = entityTypeTemplateService ?? throw new ArgumentNullException(nameof(entityTypeTemplateService));
     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;
 }
예제 #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;
 }
 /// <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="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 HbsCSharpModelGeneratorEnhance(ModelCodeGeneratorDependencies dependencies,
                                       IHbsHelperService handlebarsHelperService,
                                       IDbContextTemplateService dbContextTemplateService,
                                       IEntityTypeTemplateService entityTypeTemplateService,
                                       IEntityTypeConfigurationTemplateService entityTypeConfigurationTemplateService,
                                       IEntityTypeTransformationService entityTypeTransformationService,
                                       ICSharpDbContextGenerator cSharpDbContextGenerator,
                                       ICSharpEntityTypeGenerator cSharpEntityTypeGenerator,
                                       ICSharpEntityTypeConfigurationGenerator cSharpEntityTypeConfigurationGenerator,
                                       HandlebarsScaffoldingOptions handlebarsScaffoldingOptions) : base(dependencies,
                                                                                                         handlebarsHelperService,
                                                                                                         dbContextTemplateService,
                                                                                                         entityTypeTemplateService,
                                                                                                         entityTypeTransformationService,
                                                                                                         cSharpDbContextGenerator,
                                                                                                         cSharpEntityTypeGenerator)
 {
     EntityTypeConfigurationTemplateService = entityTypeConfigurationTemplateService;
     CSharpEntityTypeConfigurationGenerator = cSharpEntityTypeConfigurationGenerator;
     HandlebarsScaffoldingOptions           = handlebarsScaffoldingOptions ?? HandlebarsScaffoldingOptions.Default;
 }