Class ConnectionResolverOptions
- Namespace
- Cratis.Arc.Connections
- Assembly
- Cratis.Arc.Core.dll
Represents the options for one connection resolver slot.
public class ConnectionResolverOptions
- Inheritance
-
ConnectionResolverOptions
- Inherited Members
- Extension Methods
Constructors
ConnectionResolverOptions()
public ConnectionResolverOptions()
Properties
CustomType
Gets or sets the IConnectionResolver type used when Resolver is Custom.
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
public Type? CustomType { get; set; }
Property Value
Remarks
The type is created through dependency injection, so it can take any registered service in its constructor. It can only be set from code.
Http
public HttpConnectionResolverOptions Http { get; set; }
Property Value
Resolver
Gets or sets the ConnectionResolverType to use.
public ConnectionResolverType Resolver { get; set; }
Property Value
Template
public TemplateConnectionResolverOptions Template { get; set; }
Property Value
Methods
UseCustom<TResolver>()
Use a custom IConnectionResolver for resolving.
public ConnectionResolverOptions UseCustom<TResolver>() where TResolver : IConnectionResolver
Returns
- ConnectionResolverOptions
The ConnectionResolverOptions for continuation.
Type Parameters
TResolverThe IConnectionResolver type.
UseDefault()
Use the default resolver, which leaves the configured connection as it is.
public ConnectionResolverOptions UseDefault()
Returns
- ConnectionResolverOptions
The ConnectionResolverOptions for continuation.
UseHttp(Uri, IDictionary<string, string>?)
Use an HTTP endpoint for resolving.
public ConnectionResolverOptions UseHttp(Uri endpoint, IDictionary<string, string>? headers = null)
Parameters
endpointUriThe endpoint the request is posted to.
headersIDictionary<string, string>Optional headers sent with every request.
Returns
- ConnectionResolverOptions
The ConnectionResolverOptions for continuation.
UseTemplate(string?, string?, string?)
Use templates for resolving.
public ConnectionResolverOptions UseTemplate(string? connectionString = null, string? database = null, string? schema = null)
Parameters
connectionStringstringOptional connection string template.
databasestringOptional database name template.
schemastringOptional schema name template.
Returns
- ConnectionResolverOptions
The ConnectionResolverOptions for continuation.