/// <summary> /// Constructor for the HbsCSharpModelGenerator. /// </summary> /// <param name="databaseModelFactory">Service to reverse engineer a database into a database model.</param> /// <param name="scaffoldingModelFactory">Factory to create a scaffolding model.</param> /// <param name="modelCodeGeneratorSelector">Selects a model code generator service for a given programming language.</param> /// <param name="cSharpUtilities">C# utilities.</param> /// <param name="cSharpHelper">C# helper.</param> /// <param name="connectionStringResolver">Connection string resolver.</param> public HbsReverseEngineerScaffolderEnhance( HandlebarsScaffoldingOptions handlebarsScaffoldingOptions, IDatabaseModelFactory databaseModelFactory, IScaffoldingModelFactory scaffoldingModelFactory, IModelCodeGeneratorSelector modelCodeGeneratorSelector, ICSharpUtilities cSharpUtilities, ICSharpHelper cSharpHelper, INamedConnectionStringResolver connectionStringResolver) : base(databaseModelFactory, scaffoldingModelFactory, modelCodeGeneratorSelector, cSharpUtilities, cSharpHelper, connectionStringResolver) { HandlebarsScaffoldingOptions = handlebarsScaffoldingOptions ?? HandlebarsScaffoldingOptions.Default; }
/// <summary> /// Constructor for the Handlebars DbContext generator. /// </summary> /// <param name="providerConfigurationCodeGenerator">Generator for scaffolding provider.</param> /// <param name="annotationCodeGenerator">Annotation code generator.</param> /// <param name="cSharpHelper">CSharp helper.</param> /// <param name="dbContextTemplateService">Template service for DbContext generator.</param> /// <param name="entityTypeTransformationService">Service for transforming entity definitions.</param> /// <param name="options">Handlebars scaffolding options.</param> public HbsCSharpDbContextGenerator( [NotNull] IProviderConfigurationCodeGenerator providerConfigurationCodeGenerator, [NotNull] IAnnotationCodeGenerator annotationCodeGenerator, [NotNull] IDbContextTemplateService dbContextTemplateService, [NotNull] IEntityTypeTransformationService entityTypeTransformationService, [NotNull] ICSharpHelper cSharpHelper, [NotNull] IOptions <HandlebarsScaffoldingOptions> options) : base(providerConfigurationCodeGenerator, annotationCodeGenerator, cSharpHelper) { ProviderConfigurationCodeGenerator = providerConfigurationCodeGenerator; AnnotationCodeGenerator = annotationCodeGenerator; CSharpHelper = cSharpHelper; DbContextTemplateService = dbContextTemplateService; EntityTypeTransformationService = entityTypeTransformationService; _options = options; }
/// <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 CSharpDbContextGenerator( [NotNull] IProviderConfigurationCodeGenerator providerConfigurationCodeGenerator, [NotNull] IAnnotationCodeGenerator annotationCodeGenerator, [NotNull] ICSharpHelper cSharpHelper, [NotNull] LoggingDefinitions loggingDefinitions) { Check.NotNull(providerConfigurationCodeGenerator, nameof(providerConfigurationCodeGenerator)); Check.NotNull(annotationCodeGenerator, nameof(annotationCodeGenerator)); Check.NotNull(cSharpHelper, nameof(cSharpHelper)); Check.NotNull(loggingDefinitions, nameof(loggingDefinitions)); _providerConfigurationCodeGenerator = providerConfigurationCodeGenerator; _annotationCodeGenerator = annotationCodeGenerator; _code = cSharpHelper; _loggingDefinitions = loggingDefinitions; }
/// <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 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] ResolvingNamesService resolvingNamesService, [NotNull] IOptions <HandlebarsScaffoldingOptions> options) : base(annotationCodeGenerator, cSharpHelper) { EntityTypeTemplateService = entityTypeTemplateService; EntityTypeTransformationService = entityTypeTransformationService; CSharpHelper = cSharpHelper; TypeScriptHelper = typeScriptHelper; ResolvingNamesService = resolvingNamesService; _options = options; }
/// <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 ReverseEngineerScaffolder( IDatabaseModelFactory databaseModelFactory, IScaffoldingModelFactory scaffoldingModelFactory, IModelCodeGeneratorSelector modelCodeGeneratorSelector, ICSharpUtilities cSharpUtilities, ICSharpHelper cSharpHelper, IDesignTimeConnectionStringResolver connectionStringResolver, IOperationReporter reporter) { _databaseModelFactory = databaseModelFactory; _factory = scaffoldingModelFactory; ModelCodeGeneratorSelector = modelCodeGeneratorSelector; _cSharpUtilities = cSharpUtilities; _code = cSharpHelper; _connectionStringResolver = connectionStringResolver; _reporter = reporter; }
/// <summary> /// Constructor for the HbsCSharpModelGenerator. /// </summary> /// <param name="databaseModelFactory">Service to reverse engineer a database into a database model.</param> /// <param name="scaffoldingModelFactory">Factory to create a scaffolding model.</param> /// <param name="modelCodeGeneratorSelector">Selects a model code generator service for a given programming language.</param> /// <param name="cSharpUtilities">C# utilities.</param> /// <param name="cSharpHelper">C# helper.</param> /// <param name="connectionStringResolver">Connection string resolver.</param> /// <param name="reporter">Operation reporter.</param> public HbsReverseEngineerScaffolder( [NotNull] IDatabaseModelFactory databaseModelFactory, [NotNull] IScaffoldingModelFactory scaffoldingModelFactory, [NotNull] IModelCodeGeneratorSelector modelCodeGeneratorSelector, [NotNull] ICSharpUtilities cSharpUtilities, [NotNull] ICSharpHelper cSharpHelper, [NotNull] INamedConnectionStringResolver connectionStringResolver, [NotNull] IOperationReporter reporter) : base(databaseModelFactory, scaffoldingModelFactory, modelCodeGeneratorSelector, cSharpUtilities, cSharpHelper, connectionStringResolver, reporter) { Check.NotNull(databaseModelFactory, nameof(databaseModelFactory)); Check.NotNull(scaffoldingModelFactory, nameof(scaffoldingModelFactory)); Check.NotNull(modelCodeGeneratorSelector, nameof(modelCodeGeneratorSelector)); Check.NotNull(cSharpUtilities, nameof(cSharpUtilities)); Check.NotNull(cSharpHelper, nameof(cSharpHelper)); Check.NotNull(connectionStringResolver, nameof(connectionStringResolver)); Check.NotNull(reporter, nameof(reporter)); }
public ReverseEngineerScaffolder( IDatabaseModelFactory databaseModelFactory, IScaffoldingModelFactory scaffoldingModelFactory, IFunctionScaffolder functionScaffolder, IFunctionModelFactory functionModelFactory, IProcedureScaffolder procedureScaffolder, IProcedureModelFactory procedureModelFactory, IModelCodeGeneratorSelector modelCodeGeneratorSelector, ICSharpHelper cSharpHelper) { this.databaseModelFactory = databaseModelFactory; factory = scaffoldingModelFactory; code = cSharpHelper; this.functionScaffolder = functionScaffolder; this.functionModelFactory = functionModelFactory; this.procedureScaffolder = procedureScaffolder; this.procedureModelFactory = procedureModelFactory; ModelCodeGeneratorSelector = modelCodeGeneratorSelector; }
public DbContextGenerator( IOptions <DbContextOptions> dbContextOptionsAccessor, TypeResolverService typeResolver, IProviderConfigurationCodeGenerator providerCodeGenerators, IAnnotationCodeGenerator annotationCodeGenerator, ICSharpHelper cSharpHelper ) : base( providerCodeGenerators, annotationCodeGenerator, cSharpHelper ) { _code = cSharpHelper; dbContextOptions = dbContextOptionsAccessor.Value; this.typeResolver = typeResolver; this.providerCodeGenerators = providerCodeGenerators; this.annotationCodeGenerator = annotationCodeGenerator; this.cSharpHelper = cSharpHelper; }
/// <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 ReverseEngineerScaffolder( [NotNull] IDatabaseModelFactory databaseModelFactory, [NotNull] IScaffoldingModelFactory scaffoldingModelFactory, [NotNull] IModelCodeGeneratorSelector modelCodeGeneratorSelector, [NotNull] ICSharpUtilities cSharpUtilities, [NotNull] ICSharpHelper cSharpHelper, [NotNull] INamedConnectionStringResolver connectionStringResolver) { Check.NotNull(databaseModelFactory, nameof(databaseModelFactory)); Check.NotNull(scaffoldingModelFactory, nameof(scaffoldingModelFactory)); Check.NotNull(modelCodeGeneratorSelector, nameof(modelCodeGeneratorSelector)); Check.NotNull(cSharpHelper, nameof(cSharpHelper)); _databaseModelFactory = databaseModelFactory; _factory = scaffoldingModelFactory; ModelCodeGeneratorSelector = modelCodeGeneratorSelector; _cSharpUtilities = cSharpUtilities; _code = cSharpHelper; _connectionStringResolver = connectionStringResolver; }
/// <summary> /// Constructor for the Handlebars DbContext generator. /// </summary> /// <param name="legacyProviderCodeGenerators">Legacy provider code generators</param> /// <param name="providerCodeGenerators">Generator for scaffolding provider.</param> /// <param name="annotationCodeGenerator">Annotation code generator.</param> /// <param name="dbContextTemplateService">Template service for DbContext generator.</param> /// <param name="cSharpHelper">CSharp helper.</param> public HbsCSharpDbContextGenerator( #pragma warning disable CS0618 // Type or member is obsolete IEnumerable <IScaffoldingProviderCodeGenerator> legacyProviderCodeGenerators, #pragma warning restore CS0618 // Type or member is obsolete IEnumerable <IProviderConfigurationCodeGenerator> providerCodeGenerators, IAnnotationCodeGenerator annotationCodeGenerator, IDbContextTemplateService dbContextTemplateService, ICSharpHelper cSharpHelper) { if (!legacyProviderCodeGenerators.Any() && !providerCodeGenerators.Any()) { throw new ArgumentException(AbstractionsStrings.CollectionArgumentIsEmpty(nameof(providerCodeGenerators))); } _legacyProviderCodeGenerator = legacyProviderCodeGenerators.LastOrDefault(); _providerConfigurationCodeGenerator = providerCodeGenerators.LastOrDefault(); _annotationCodeGenerator = annotationCodeGenerator ?? throw new ArgumentNullException(nameof(annotationCodeGenerator)); DbContextTemplateService = dbContextTemplateService ?? throw new ArgumentNullException(nameof(dbContextTemplateService)); _code = cSharpHelper ?? throw new ArgumentNullException(nameof(cSharpHelper)); }
public CSharpDbContextGeneratorBase( [NotNull] IEnumerable <IScaffoldingProviderCodeGenerator> legacyProviderCodeGenerators, [NotNull] IEnumerable <IProviderConfigurationCodeGenerator> providerCodeGenerators, [NotNull] IAnnotationCodeGenerator annotationCodeGenerator, [NotNull] ICSharpHelper cSharpHelper) { Check.NotNull(legacyProviderCodeGenerators, nameof(legacyProviderCodeGenerators)); Check.NotNull(providerCodeGenerators, nameof(providerCodeGenerators)); Check.NotNull(annotationCodeGenerator, nameof(annotationCodeGenerator)); Check.NotNull(cSharpHelper, nameof(cSharpHelper)); if (!legacyProviderCodeGenerators.Any() && !providerCodeGenerators.Any()) { throw new ArgumentException(AbstractionsStrings.CollectionArgumentIsEmpty(nameof(providerCodeGenerators))); } this._legacyProviderCodeGenerator = legacyProviderCodeGenerators.LastOrDefault(); this._providerConfigurationCodeGenerator = providerCodeGenerators.LastOrDefault(); this._annotationCodeGenerator = annotationCodeGenerator; this._code = cSharpHelper; }
/// <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="cSharpHelper">CSharp helper.</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] ICSharpHelper cSharpHelper, [NotNull] IOptions <HandlebarsScaffoldingOptions> options) : base(dependencies, cSharpDbContextGenerator, cSharpEntityTypeGenerator) { HandlebarsHelperService = handlebarsHelperService; HandlebarsBlockHelperService = handlebarsBlockHelperService; DbContextTemplateService = dbContextTemplateService; EntityTypeTemplateService = entityTypeTemplateService; EntityTypeTransformationService = entityTypeTransformationService; CSharpHelper = cSharpHelper; _options = options; }
/// <summary> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </summary> public CSharpDbContextGenerator( #pragma warning disable CS0618 // Type or member is obsolete [NotNull] IEnumerable <IScaffoldingProviderCodeGenerator> legacyProviderCodeGenerators, #pragma warning restore CS0618 // Type or member is obsolete [NotNull] IEnumerable <IProviderConfigurationCodeGenerator> providerCodeGenerators, [NotNull] IAnnotationCodeGenerator annotationCodeGenerator, [NotNull] ICSharpHelper cSharpHelper) { Check.NotNull(legacyProviderCodeGenerators, nameof(legacyProviderCodeGenerators)); Check.NotNull(providerCodeGenerators, nameof(providerCodeGenerators)); Check.NotNull(annotationCodeGenerator, nameof(annotationCodeGenerator)); Check.NotNull(cSharpHelper, nameof(cSharpHelper)); if (!legacyProviderCodeGenerators.Any() && !providerCodeGenerators.Any()) { throw new ArgumentException(AbstractionsStrings.CollectionArgumentIsEmpty(nameof(providerCodeGenerators))); } _legacyProviderCodeGenerator = legacyProviderCodeGenerators.LastOrDefault(); _providerConfigurationCodeGenerator = providerCodeGenerators.LastOrDefault(); _annotationCodeGenerator = annotationCodeGenerator; _code = cSharpHelper; }
/// <summary> /// Constructor for the Handlebars DbContext generator. /// </summary> /// <param name="handlebarsScaffoldingOptions">Handlebars Scaffolding Options.</param> /// <param name="legacyProviderCodeGenerators">Legacy provider code generators.</param> /// <param name="providerCodeGenerators">Generator for scaffolding provider.</param> /// <param name="annotationCodeGenerator">Annotation code generator.</param> /// <param name="dbContextTemplateService">Template service for DbContext generator.</param> /// <param name="entityTypeTransformationService">Service for transforming entity definitions.</param> /// <param name="cSharpHelper">CSharp helper.</param> public HbsCSharpDbContextGeneratorEnhance( #pragma warning disable CS0618 // Type or member is obsolete IEnumerable <IScaffoldingProviderCodeGenerator> legacyProviderCodeGenerators, #pragma warning restore CS0618 // Type or member is obsolete IEnumerable <IProviderConfigurationCodeGenerator> providerCodeGenerators, IAnnotationCodeGenerator annotationCodeGenerator, IDbContextTemplateService dbContextTemplateService, IEntityTypeTransformationService entityTypeTransformationService, ICSharpHelper cSharpHelper, HandlebarsScaffoldingOptions handlebarsScaffoldingOptions) { if (!legacyProviderCodeGenerators.Any() && !providerCodeGenerators.Any()) { throw new ArgumentException(AbstractionsStrings.CollectionArgumentIsEmpty(nameof(providerCodeGenerators))); } HandlebarsScaffoldingOptions = handlebarsScaffoldingOptions ?? HandlebarsScaffoldingOptions.Default; LegacyProviderCodeGenerator = legacyProviderCodeGenerators.LastOrDefault(); ProviderConfigurationCodeGenerator = providerCodeGenerators.LastOrDefault(); CodeGenerator = annotationCodeGenerator ?? throw new ArgumentNullException(nameof(annotationCodeGenerator)); DbContextTemplateService = dbContextTemplateService ?? throw new ArgumentNullException(nameof(dbContextTemplateService)); EntityTypeTransformationService = entityTypeTransformationService ?? throw new ArgumentNullException(nameof(entityTypeTransformationService)); CSharpHelper = cSharpHelper ?? throw new ArgumentNullException(nameof(cSharpHelper)); }
public SqlServerFunctionScaffolder([NotNull] ICSharpHelper code) : base(code) { }
public CommentCSharpEntityTypeGenerator([NotNull] ICSharpHelper cSharpHelper) { _code = cSharpHelper; }
/// <summary> /// Clones this dependency parameter object with one service replaced. /// </summary> /// <param name="csharpHelper"> A replacement for the current dependency of this type. </param> /// <returns> A new parameter object with the given service replaced. </returns> public CSharpSnapshotGeneratorDependencies With( [NotNull] ICSharpHelper csharpHelper) => new CSharpSnapshotGeneratorDependencies(csharpHelper);
public ConventionEntityTypeGeneratorMock(ICSharpHelper cSharpHelper, string classBody = null, IConventionConfiguration configuration = null) : base(cSharpHelper, configuration) { _classBody = classBody; }
/// <summary> /// Clones this dependency parameter object with one service replaced. /// </summary> /// <param name="csharpHelper"> A replacement for the current dependency of this type. </param> /// <returns> A new parameter object with the given service replaced. </returns> public CSharpMigrationOperationGeneratorDependencies With([NotNull] ICSharpHelper csharpHelper) => new CSharpMigrationOperationGeneratorDependencies(csharpHelper);
/// <summary> /// <para> /// Creates the service dependencies parameter object for a <see cref="CSharpMigrationOperationGenerator" />. /// </para> /// <para> /// Do not call this constructor directly from either provider or application code as it may change /// as new dependencies are added. Instead, use this type in your constructor so that an instance /// will be created and injected automatically by the dependency injection container. To create /// an instance with some dependent services replaced, first resolve the object from the dependency /// injection container, then replace selected services using the 'With...' methods. Do not call /// the constructor at any point in this process. /// </para> /// <para> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </para> /// </summary> /// <param name="csharpHelper"> The C# helper. </param> public CSharpMigrationOperationGeneratorDependencies([NotNull] ICSharpHelper csharpHelper) { Check.NotNull(csharpHelper, nameof(csharpHelper)); CSharpHelper = csharpHelper; }
public SqlServerStoredProcedureScaffolder(IProcedureModelFactory procedureModelFactory, [NotNull] ICSharpHelper code) { this.procedureModelFactory = procedureModelFactory; this.code = code; }
public MyEntityTypeGenerator([NotNull] ICSharpHelper cSharpHelper) : base(cSharpHelper) { }
/// <summary> /// <para> /// Creates the service dependencies parameter object for a <see cref="CSharpMigrationOperationGenerator" />. /// </para> /// <para> /// Do not call this constructor directly from either provider or application code as it may change /// as new dependencies are added. Instead, use this type in your constructor so that an instance /// will be created and injected automatically by the dependency injection container. To create /// an instance with some dependent services replaced, first resolve the object from the dependency /// injection container, then replace selected services using the 'With...' methods. Do not call /// the constructor at any point in this process. /// </para> /// <para> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </para> /// </summary> /// <param name="csharpHelper"> The C# helper. </param> public CSharpMigrationOperationGeneratorDependencies([NotNull] ICSharpHelper csharpHelper) { CSharpHelper = csharpHelper; }
public MyStoreEntityTypeGenerator(ICSharpHelper cSharpHelper) : base(cSharpHelper) { }
public SqlServerStoredProcedureScaffolder([NotNull] ICSharpHelper code) : base(code) { }
public SqlServerStoredProcedureScaffolder([NotNull] ICSharpHelper code) { this.code = code; }
public AdventureWorkEntityTypeGenerator(ICSharpHelper cSharpHelper) : base(cSharpHelper) { }
public SqlServerStoredProcedureScaffolder([NotNull] ICSharpHelper code) : base(code) { FileNameSuffix = "Procedures"; }
/// <summary> /// /// </summary> /// <param name="annotationCodeGenerator"></param> /// <param name="cSharpHelper"></param> public OverrideBase(IAnnotationCodeGenerator annotationCodeGenerator, ICSharpHelper CSharpHelper) : base(annotationCodeGenerator, CSharpHelper) { }