private void CreateConstructor() { var constructor = new VBClassConstructor(); constructor.Args.Add(new VBArgument($"SqlServerTable", $"table")); constructor.Statements.Add($"Me.table = table"); this.Constructors.Add(constructor); }
private void CreateConstructor(DataTable dataTable) { var constructor = new VBClassConstructor("dbAccess"); constructor.Args.Add(new VBArgument("SqlServerDbAccess", "dbAccess")); this.Constructors.Add(constructor); constructor.Statements.Add($"Query = new {dataTable.TableName}Query(Me)"); }
private void CreateConstructor() { string connectionStringName = $"{Quotes}{dataset.DataSetName}ConnectionString{Quotes}"; string parameter = $"New ConnectionStringBuilder({connectionStringName})"; var constructor = new VBClassConstructor(parameter); SetupConstructorStatements(constructor); this.Constructors.Add(constructor); }
private void SetupConstructorStatements(VBClassConstructor constructor) { foreach (DataTable table in dataset.Tables) { string tableName = table.TableName; if (table.Prefix.ToLower() == "v") { constructor.Statements.Add($"{tableName} = New {tableName}View(Me)"); continue; } constructor.Statements.Add($"{tableName} = New {tableName}RepositoryPack(Me)"); } }
private void CreateConstructor() { var constructor = new VBClassConstructor(); this.Constructors.Add(constructor); }