Method Clone
- Namespace
- YndigoBlue.Velocity.Interfaces
- Assembly
- YndigoBlue.Velocity.dll
Clone(Action<IDatasourceConnection>)
Creates a copy of this connection with all property values duplicated. An optional configure action can be supplied to override specific properties on the copy.
IDatasourceConnection Clone(Action<IDatasourceConnection> configure = null)
Parameters
configureAction<IDatasourceConnection>An optional action that receives the cloned connection and can set any properties that should differ from the original — for example, overriding the port or SSL mode.
Returns
- IDatasourceConnection
A new independent connection of the same concrete type as the original.
Examples
// Create a copy of the default test connection but using the SSL port and VerifyCA mode
var c = TestConfig.DatasourceConnection.Clone(x =>
{
x.Port = TestConfig.SslPort;
x.SslMode = SslMode.VerifyCA;
x.SslCaPath = TestConfig.SslCaPath;
});