public TextTemplatingModelGenerator(
     ModelCodeGeneratorDependencies dependencies,
     ITextTemplating textTemplatingService,
     IOperationReporter reporter)
     : base(dependencies)
 {
     _host     = textTemplatingService;
     _reporter = reporter;
 }
Exemplo n.º 2
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public CSharpModelGenerator(
     ModelCodeGeneratorDependencies dependencies,
     ICSharpDbContextGenerator cSharpDbContextGenerator,
     ICSharpEntityTypeGenerator cSharpEntityTypeGenerator)
     : base(dependencies)
 {
     CSharpDbContextGenerator  = cSharpDbContextGenerator;
     CSharpEntityTypeGenerator = cSharpEntityTypeGenerator;
 }
 public MyModelGenerator(
     ModelCodeGeneratorDependencies dependencies,
     IProviderConfigurationCodeGenerator providerConfigurationCodeGenerator,
     IAnnotationCodeGenerator annotationCodeGenerator,
     ICSharpHelper csharpHelper)
     : base(dependencies)
 {
     _providerConfigurationCodeGenerator = providerConfigurationCodeGenerator;
     _annotationCodeGenerator            = annotationCodeGenerator;
     _csharpHelper = csharpHelper;
 }
Exemplo n.º 4
0
        /// <summary>
        ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
        ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
        ///     any release. You should only use it directly in your code with extreme caution and knowing that
        ///     doing so can result in application failures when updating to a new Entity Framework Core release.
        /// </summary>
        public CSharpModelGenerator(
            [NotNull] ModelCodeGeneratorDependencies dependencies,
            [NotNull] ICSharpDbContextGenerator cSharpDbContextGenerator,
            [NotNull] ICSharpEntityTypeGenerator cSharpEntityTypeGenerator)
            : base(dependencies)
        {
            Check.NotNull(cSharpDbContextGenerator, nameof(cSharpDbContextGenerator));
            Check.NotNull(cSharpEntityTypeGenerator, nameof(cSharpEntityTypeGenerator));

            CSharpDbContextGenerator  = cSharpDbContextGenerator;
            CSharpEntityTypeGenerator = 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));
 }
 /// <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.º 7
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;
 }
Exemplo n.º 9
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ModelCodeGenerator" /> class.
 /// </summary>
 /// <param name="dependencies">The dependencies.</param>
 protected ModelCodeGenerator(ModelCodeGeneratorDependencies dependencies)
 {
     Dependencies = dependencies;
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TemplatedModelGenerator"/> class.
 /// </summary>
 /// <param name="dependencies">The dependencies.</param>
 protected TemplatedModelGenerator(ModelCodeGeneratorDependencies dependencies)
     : base(dependencies)
 {
 }