Pidgin

Class Configuration

Methods for creating and updating IConfiguration<TToken>s.

Inheritance
Inherited Members
Declaration
public static class Configuration

Methods

Default<TToken>()

Returns the default configuration for the token type TToken.

Declaration
public static IConfiguration<TToken> Default<TToken>()
Returns
Type Description

IConfiguration<TToken>

The default configuration for the token type TToken.

Type Parameters
Name Description

TToken

The token type.

WithArrayPoolProvider<TToken>(IConfiguration<TToken>, IArrayPoolProvider)

Override the ArrayPoolProvider.

Declaration
public static IConfiguration<TToken> WithArrayPoolProvider<TToken>(this IConfiguration<TToken> configuration, IArrayPoolProvider arrayPoolProvider)
Parameters
Type Name Description

IConfiguration<TToken>

configuration

The configuration.

IArrayPoolProvider

arrayPoolProvider

The new ArrayPoolProvider.

Returns
Type Description

IConfiguration<TToken>

A copy of configuration with its ArrayPoolProvider overridden.

Type Parameters
Name Description

TToken

The token type.

WithPosCalculator<TToken>(IConfiguration<TToken>, Func<TToken, SourcePosDelta>)

Override the SourcePosCalculator.

Declaration
public static IConfiguration<TToken> WithPosCalculator<TToken>(this IConfiguration<TToken> configuration, Func<TToken, SourcePosDelta> posCalculator)
Parameters
Type Name Description

IConfiguration<TToken>

configuration

The configuration.

Func<TToken, SourcePosDelta>

posCalculator

The new SourcePosCalculator.

Returns
Type Description

IConfiguration<TToken>

A copy of configuration with its SourcePosCalculator overridden.

Type Parameters
Name Description

TToken

The token type.