note
VeloxDB is still in beta and APIs are subject to change. We are in the process of completing the documentation, so some sections may be incomplete or empty at this time.
Class ConnectionStringParams
Provides a simple way to build a connection string.
Inheritance
Namespace: VeloxDB.Client
Assembly: vlxc.dll
Syntax
public sealed class ConnectionStringParams : Object
Constructors
ConnectionStringParams()
Creates an empty instance of ConnectionStringParams.
Declaration
public ConnectionStringParams()
Properties
Addresses
Gets addresses, to add an address use AddAddress(String).
Declaration
public string[] Addresses { get; }
Property Value
Type | Description |
---|---|
System.String[] |
BufferPoolSize
Gets or sets connection's buffer size in bytes.
Declaration
public int BufferPoolSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
This buffer pool is used for serializing and deserializing messages. If your messages are larger than this number communication layer will often need to allocate memory, which might have performance impact.
CACert
Gets or sets the path to the Certificate Authority (CA) certificate file used for SSL/TLS verification.
Declaration
public string CACert { get; set; }
Property Value
Type | Description |
---|---|
System.String |
OpenTimeout
Gets or sets how much to wait for connection to open in milliseconds.
Declaration
public int OpenTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PoolSize
Specifies number of connections in connection pool.
Declaration
public int PoolSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
RetryTimeout
Gets or sets the time span (in milliseconds) during which the request will be auto-retried before giving up and throwing an exception.
Declaration
public int RetryTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ServerCerts
Gets or sets the path to the server certificate file used for SSL/TLS verification. To add server certificates see AddServerCert(String)
Declaration
public string[] ServerCerts { get; }
Property Value
Type | Description |
---|---|
System.String[] |
ServiceName
Gets or sets name of service to which to connect. For database apis, this should be empty string. Default value is empty string.
Declaration
public string ServiceName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UseSSL
Gets or sets a value indicating whether SSL/TLS encryption should be used for the request.
Declaration
public bool UseSSL { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
VerifyCert
Gets or sets a value indicating whether SSL/TLS certificate verification should be disabled.
Declaration
public bool VerifyCert { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
AddAddress(String)
Add address to which to connect. Multiple addresses can be added. In case of multiple addresses each is tried until connection succeeds.
Declaration
public void AddAddress(string address)
Parameters
Type | Name | Description |
---|---|---|
System.String | address |
AddServerCert(String)
Add server certificate to verify server identity. Multiple certificates can be added (one for each connection added).
Declaration
public void AddServerCert(string serverCert)
Parameters
Type | Name | Description |
---|---|---|
System.String | serverCert |
Clone()
Returns a clone of the current ConnectionStringParams object. Returns: ConnectionStringParams: A new instance with the same attributes.
Declaration
public ConnectionStringParams Clone()
Returns
Type | Description |
---|---|
ConnectionStringParams |
GenerateConnectionString()
Create connection string. This string should be passed to Get<T>(String).
Declaration
public string GenerateConnectionString()
Returns
Type | Description |
---|---|
System.String |
Exceptions
Type | Condition |
---|---|
InvalidConnectionStringException | If resulting connection string is invalid |