C# Class SalarDbCodeGenerator.GeneratorEngine.Generator

Datei anzeigen Open project: GitOffice/SalarDbCodeGenerator

Public Methods

Method Description
Generate ( ) : void

Let the engine start

Generator ( ProjectDefinaton project, PatternProject pattern, DbDatabase database, ExSchemaEngine schemaEngine ) : System

Private Methods

Method Description
ConditionItem_AppliesToColumn ( PatternContent partialContent, DbTable table, DbColumn column ) : string

Partial content replacer.

ConditionItem_AppliesToForeignKeyColumns ( PatternContent partialContent, DbTable table, DbForeignKey foreignKey ) : string

Partial content replacer.

ConditionItem_AppliesToTable ( PatternContent partialContent, DbTable table ) : string

Partial content replacer.

ConditionItem_AppliesToTableAndViewsAll ( PatternContent partialContent, DbTable table ) : string
FieldType_ColumnDataSize ( DbColumn column ) : string

Get field size

FieldType_ColumnDataTypeSize ( DbColumn column ) : string

Get field type database full name

PatternContentAppliesTo_General ( PatternContent partialContent ) : string

Partial content replacer.

PatternContentAppliesTo_OneTable ( string baseContent, List patternContent, DbTable table, DbColumn column, DbForeignKey foreignKey ) : string

One table, one column or one foreignKey in table!

PatternContentAppliesTo_ProjectFiles ( PatternContent partialContent, string fileNamePath ) : string

Partial content replacer.

PatternContentAppliesTo_TablesAndViews ( string baseContent, List patternContent, DbTable tablesList, DbTable viewsList ) : string
PatternFileAppliesTo_GeneralApplier ( PatternFile patternFile ) : void

Starts to apply general replacements to the pattern

PatternFileAppliesTo_ProjectFileApplier ( PatternFile commonPattern ) : void

Starts to apply project files to the pattern

PatternFileAppliesTo_TablesAndViewsApplier ( DbTable tablesList, DbTable viewsList, PatternFileWhereToApply whatListToUse, PatternFile patternFile ) : void

Pattern file - AppliesTo - TablesAndViews

Replacer_ConditionItem_AppliesToColumn ( string content, DbTable table, DbColumn column ) : string

Applies column data to pattern content replacement

Replacer_ConditionItem_AppliesToForeignKey ( string content, DbTable table, DbForeignKey foreignKey ) : string

Applies foreign key column data to pattern content replacement

Replacer_ConditionItem_AppliesToForeignKeys ( string content, DbTable table ) : string

Applies table foreign keys to pattern content replacement

Replacer_ConditionItem_AppliesToGeneral ( string content ) : string

Applies data to pattern content replacement

Replacer_ConditionItem_AppliesToIndexConstraints ( string content, DbTable table, bool uniqueKeys ) : string

Applies table index constraintsto pattern content replacement

Replacer_ConditionItem_AppliesToTable ( string content, DbTable table ) : string

Applies table data to pattern content replacement

Replacer_ConditionItem_ProjectFile ( string content, string fileNamePath ) : string

Applies data to pattern content replacement for column

Replacer_DatabaseProvider ( string content ) : string

Replaces the database provider class name

Replacer_GeneratorGeneral ( string content ) : string
Replacer_PatternBaseContent ( string baseContent, string tableNameSchema, string tableNameDb ) : string
Replacer_PatternFileName ( string fileName, string tableSchemaName, string tableNameDb, string tableNameSchemaCS ) : string
UserHasSelectedTable ( string tableName ) : bool

Checking to see if user has selected this table to be generated

UserHasSelectedView ( string viewName ) : bool

Checking to see if user has selected this view to be generated

Method Details

Generate() public method

Let the engine start
public Generate ( ) : void
return void

Generator() public method

public Generator ( ProjectDefinaton project, PatternProject pattern, DbDatabase database, ExSchemaEngine schemaEngine ) : System
project SalarDbCodeGenerator.DbProject.ProjectDefinaton
pattern PatternProject
database DbDatabase
schemaEngine ExSchemaEngine
return System