Exemple #1
0
 /// <summary>
 /// Constructor for the Handlebars entity types generator.
 /// </summary>
 /// <param name="cSharpUtilities">CSharp utilities.</param>
 /// <param name="entityTypeTemplateService">Template service for the entity types generator.</param>
 public HbsCSharpEntityTypeGenerator(
     ICSharpUtilities cSharpUtilities,
     IEntityTypeTemplateService entityTypeTemplateService)
 {
     CSharpUtilities           = cSharpUtilities ?? throw new ArgumentNullException(nameof(cSharpUtilities));
     EntityTypeTemplateService = entityTypeTemplateService ?? throw new ArgumentNullException(nameof(entityTypeTemplateService));
 }
 /// <summary>
 /// Constructor for the Handlebars entity types generator.
 /// </summary>
 /// <param name="entityTypeTemplateService">Template service for the entity types generator.</param>
 /// <param name="cSharpHelper">CSharp helper.</param>
 public HbsCSharpEntityTypeGenerator(
     IEntityTypeTemplateService entityTypeTemplateService,
     ICSharpHelper cSharpHelper)
 {
     _code = cSharpHelper ?? throw new ArgumentNullException(nameof(cSharpHelper));
     EntityTypeTemplateService = entityTypeTemplateService ?? throw new ArgumentNullException(nameof(entityTypeTemplateService));
 }
 public MyHbsCSharpEntityTypeGenerator(
     ICSharpHelper cSharpHelper,
     IEntityTypeTemplateService entityTypeTemplateService,
     IEntityTypeTransformationService entityTypeTransformationService,
     IOptions <HandlebarsScaffoldingOptions> options)
     : base(cSharpHelper, entityTypeTemplateService, entityTypeTransformationService, options)
 {
     _options = options;
 }
 /// <summary>
 /// Constructor for the Handlebars entity types generator.
 /// </summary>
 /// <param name="entityTypeTemplateService">Template service for the entity types generator.</param>
 /// <param name="entityTypeTransformationService">Service for transforming entity definitions.</param>
 /// <param name="cSharpHelper">CSharp helper.</param>
 /// <param name="typeScriptHelper">TypeScript helper.</param>
 public HbsTypeScriptEntityTypeGenerator(
     IEntityTypeTemplateService entityTypeTemplateService,
     IEntityTypeTransformationService entityTypeTransformationService,
     ICSharpHelper cSharpHelper,
     ITypeScriptHelper typeScriptHelper)
 {
     CSharpHelper                    = cSharpHelper ?? throw new ArgumentNullException(nameof(cSharpHelper));
     TypeScriptHelper                = typeScriptHelper ?? throw new ArgumentNullException(nameof(typeScriptHelper));
     EntityTypeTemplateService       = entityTypeTemplateService ?? throw new ArgumentNullException(nameof(entityTypeTemplateService));
     EntityTypeTransformationService = entityTypeTransformationService ?? throw new ArgumentNullException(nameof(entityTypeTransformationService));
 }
 /// <summary>
 /// Constructor for the Handlebars entity types generator.
 /// </summary>
 /// <param name="cSharpHelper">CSharp helper.</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 HbsCSharpEntityTypeGenerator(
     [NotNull] ICSharpHelper cSharpHelper,
     [NotNull] IEntityTypeTemplateService entityTypeTemplateService,
     [NotNull] IEntityTypeTransformationService entityTypeTransformationService,
     [NotNull] IOptions <HandlebarsScaffoldingOptions> options)
     : base(cSharpHelper)
 {
     CSharpHelper = cSharpHelper;
     EntityTypeTemplateService       = entityTypeTemplateService;
     EntityTypeTransformationService = entityTypeTransformationService;
     _options = options;
 }
Exemple #6
0
 /// <summary>
 /// Constructor for the Handlebars entity types generator.
 /// </summary>
 /// <param name="entityTypeTemplateService">Template service for the entity types generator.</param>
 /// <param name="entityTypeTransformationService">Service for transforming entity definitions.</param>
 /// <param name="cSharpHelper">CSharp helper.</param>
 /// <param name="typeScriptHelper">TypeScript helper.</param>
 public HbsTypeScriptEntityTypeGenerator(
     [NotNull] IEntityTypeTemplateService entityTypeTemplateService,
     [NotNull] IEntityTypeTransformationService entityTypeTransformationService,
     [NotNull] ICSharpHelper cSharpHelper,
     [NotNull] ITypeScriptHelper typeScriptHelper)
     : base(cSharpHelper)
 {
     EntityTypeTemplateService       = entityTypeTemplateService;
     EntityTypeTransformationService = entityTypeTransformationService;
     CSharpHelper     = cSharpHelper;
     TypeScriptHelper = typeScriptHelper;
 }
Exemple #7
0
 /// <summary>
 /// Constructor for the Handlebars scaffolding generator.
 /// </summary>
 /// <param name="fileService">Provides files to the template 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 types generator.</param>
 public HbsCSharpScaffoldingGenerator(
     ITemplateFileService fileService,
     IDbContextTemplateService dbContextTemplateService,
     IEntityTypeTemplateService entityTypeTemplateService,
     ICSharpDbContextGenerator cSharpDbContextGenerator,
     ICSharpEntityTypeGenerator cSharpEntityTypeGenerator)
     : base(fileService)
 {
     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 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));
 }
Exemple #9
0
 /// <summary>
 /// Constructor for the Handlebars entity types generator.
 /// </summary>
 /// <param name="annotationCodeGenerator">Annotation code generator.</param>
 /// <param name="entityTypeTemplateService">Template service for the entity types generator.</param>
 /// <param name="entityTypeTransformationService">Service for transforming entity definitions.</param>
 /// <param name="cSharpHelper">CSharp helper.</param>
 /// <param name="typeScriptHelper">TypeScript helper.</param>
 /// <param name="options">Handlebars scaffolding options.</param>
 public HbsTypeScriptEntityTypeGenerator(
     [NotNull] IAnnotationCodeGenerator annotationCodeGenerator,
     [NotNull] IEntityTypeTemplateService entityTypeTemplateService,
     [NotNull] IEntityTypeTransformationService entityTypeTransformationService,
     [NotNull] ICSharpHelper cSharpHelper,
     [NotNull] ITypeScriptHelper typeScriptHelper,
     [NotNull] IOptions <HandlebarsScaffoldingOptions> options)
     : base(annotationCodeGenerator, cSharpHelper)
 {
     EntityTypeTemplateService       = entityTypeTemplateService;
     EntityTypeTransformationService = entityTypeTransformationService;
     CSharpHelper     = cSharpHelper;
     TypeScriptHelper = typeScriptHelper;
     _options         = options;
 }
Exemple #10
0
        /// <summary>
        /// Constructor for the Handlebars entity types generator.
        /// </summary>
        /// <param name="annotationCodeGenerator">Annotation code generator.</param>
        /// <param name="cSharpHelper">CSharp helper.</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 HbsCSharpEntityTypeGenerator(
            [NotNull] IAnnotationCodeGenerator annotationCodeGenerator,
            [NotNull] ICSharpHelper cSharpHelper,
            [NotNull] IEntityTypeTemplateService entityTypeTemplateService,
            [NotNull] IEntityTypeTransformationService entityTypeTransformationService,
            [NotNull] IOptions <HandlebarsScaffoldingOptions> options)
            : base(annotationCodeGenerator, cSharpHelper)
        {
            Check.NotNull(annotationCodeGenerator, nameof(annotationCodeGenerator));
            Check.NotNull(cSharpHelper, nameof(cSharpHelper));

            AnnotationCodeGenerator         = annotationCodeGenerator;
            CSharpHelper                    = cSharpHelper;
            EntityTypeTemplateService       = entityTypeTemplateService;
            EntityTypeTransformationService = entityTypeTransformationService;
            _options = options;
        }
 /// <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;
 }
Exemple #12
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;
 }