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

Type

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

Gets or sets the options used when Resolver is Http.

public HttpConnectionResolverOptions Http { get; set; }

Property Value

HttpConnectionResolverOptions

Resolver

Gets or sets the ConnectionResolverType to use.

public ConnectionResolverType Resolver { get; set; }

Property Value

ConnectionResolverType

Template

Gets or sets the options used when Resolver is Template.

public TemplateConnectionResolverOptions Template { get; set; }

Property Value

TemplateConnectionResolverOptions

Methods

UseCustom<TResolver>()

Use a custom IConnectionResolver for resolving.

public ConnectionResolverOptions UseCustom<TResolver>() where TResolver : IConnectionResolver

Returns

ConnectionResolverOptions

The ConnectionResolverOptions for continuation.

Type Parameters

TResolver

The 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

endpoint Uri

The endpoint the request is posted to.

headers IDictionary<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

connectionString string

Optional connection string template.

database string

Optional database name template.

schema string

Optional schema name template.

Returns

ConnectionResolverOptions

The ConnectionResolverOptions for continuation.