protected override void OnExecuted(EventArgs e) { base.OnExecuted(e); ConnectionStringSettingsNode node = ChildNode as ConnectionStringSettingsNode; Debug.Assert(null != node, "Expected ConnectionStringSettingsNode"); node.AddNode(new ParameterNode("Database", "Database")); node.AddNode(new ParameterNode("Server", @"(local)\SQLEXPRESS")); node.AddNode(new ParameterNode("Integrated Security", "SSPI")); }
public void Build() { ConnectionStringsSectionNode node = hierarchy.FindNodeByType(typeof(ConnectionStringsSectionNode)) as ConnectionStringsSectionNode; if (null == node) { LogError(hierarchy.RootNode, Resources.ExceptionMissingConnectionStrings); return; } for (int index = 0; index < oracleConnectionSettings.OracleConnectionsData.Count; ++index) { OracleConnectionData oracleConnection = oracleConnectionSettings.OracleConnectionsData.Get(index); ConnectionStringSettingsNode connectionStringNode = hierarchy.FindNodeByName(node, oracleConnection.Name) as ConnectionStringSettingsNode; if (null == connectionStringNode) { LogError(node, string.Format(CultureInfo.CurrentUICulture, Resources.ExceptionConnectionStringMissing, oracleConnection.Name)); continue; } OracleConnectionElementNode oracleElementNode = new OracleConnectionElementNode(); foreach (OraclePackageData packageData in oracleConnection.Packages) { oracleElementNode.AddNode(new OraclePackageElementNode(packageData)); } connectionStringNode.AddNode(oracleElementNode); } }
private void BuildConnectionStringNode(ConnectionStringSettings connectionString) { ConnectionStringSettingsNode connectionStringNode = new ConnectionStringSettingsNode(connectionString); if (connectionStringNode.Name == defaultDatabaseName) databaseSectionNode.DefaultDatabase = connectionStringNode; node.AddNode(connectionStringNode); ICollection<ConnectionStringNameValuePair> pairs = ConnectionStringParser.Parse(connectionString.ConnectionString); foreach (ConnectionStringNameValuePair pair in pairs) { connectionStringNode.AddNode(new ParameterNode(pair.Name, pair.Value)); } }
private void BuildConnectionStringNode(ConnectionStringSettings connectionString) { ConnectionStringSettingsNode connectionStringNode = new ConnectionStringSettingsNode(connectionString); if (connectionStringNode.Name == defaultDatabaseName) databaseSectionNode.DefaultDatabase = connectionStringNode; node.AddNode(connectionStringNode); ICollection<ConnectionStringNameValuePair> pairs = ConnectionStringParser.Parse(connectionString.ConnectionString); foreach (ConnectionStringNameValuePair pair in pairs) { connectionStringNode.AddNode(new ParameterNode(pair.Name, pair.Value)); } }