Click or drag to resize

ConnectionStringSetComponent Method

Set the specified component of the connection string to value or adds it if there is no current value

Namespace:  SanteDB.Core.Configuration.Data
Assembly:  SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.481-alpha
Syntax
public void SetComponent(
	string component,
	string value
)

Parameters

component
Type: SystemString
The component of the connection string to set
value
Type: SystemString
The value of the connection string to set
Examples
C#
var cstr = new ConnectionString("npgsql", "Server=foo;Database=bar;");
cstr.SetComponent("server","foo.bar"); // Connection string is now : Server=foo.bar;Database=bar
cstr.SetComponent("user","yosemite"); // Connection string is now: Server=foo.bar;Database=bar;user=yosemite
See Also