Class Connector<TOptions, TConnection>
Provides access to driver-specific options and its connection object for a service binding.
Inheritance
System.Object
Connector<TOptions, TConnection>
Namespace: Steeltoe.Connectors
Assembly: Steeltoe.Connectors.dll
Syntax
public sealed class Connector<TOptions, TConnection> : IDisposable where TOptions : ConnectionStringOptions where TConnection : class
Type Parameters
Name | Description |
---|---|
TOptions | The driver-specific options type. |
TConnection | The driver-specific connection type. |
Constructors
| Edit this page View SourceConnector(IServiceProvider, String, ConnectorCreateConnection, Boolean)
Declaration
public Connector(IServiceProvider serviceProvider, string serviceBindingName, ConnectorCreateConnection createConnection, bool useSingletonConnection)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider | |
System.String | serviceBindingName | |
ConnectorCreateConnection | createConnection | |
System.Boolean | useSingletonConnection |
Properties
| Edit this page View SourceOptions
Gets the options for this service binding.
Declaration
public TOptions Options { get; }
Property Value
Type | Description |
---|---|
TOptions |
Methods
| Edit this page View SourceDispose()
Declaration
public void Dispose()
GetConnection()
Gets a connection for this service binding. Depending on the connector type, this either creates a new connection or returns a cached instance.
Declaration
public TConnection GetConnection()
Returns
Type | Description |
---|---|
TConnection | The connection. |