Skip to content
Concord

Class ConsumerBuilder

Namespace
Concord
Assembly
Concord.Orchestration.dll

Accepts the four consumer shapes for one enum. Each method patches the target and returns the same builder, so registrations chain.

public sealed class ConsumerBuilder
Inheritance
ConsumerBuilder
Inherited Members

Methods

Display(Type, string)

Registers a method that turns a value into display text. It must be string (TEnum). Concord answers with the member's field name for an added member.

public ConsumerBuilder Display(Type owner, string methodName)

Parameters

owner Type

The type declaring the method.

methodName string

The method name.

Returns

ConsumerBuilder

This builder.

IsDefined(Type, string)

Registers a method that reports whether a value is a real member. It must be bool (TEnum). Concord answers true for an added member.

public ConsumerBuilder IsDefined(Type owner, string methodName)

Parameters

owner Type

The type declaring the method.

methodName string

The method name.

Returns

ConsumerBuilder

This builder.

Parse(Type, string)

Registers a method that turns a name into a value. It must be TEnum (string). Concord answers before the original runs when the name matches an added member.

public ConsumerBuilder Parse(Type owner, string methodName)

Parameters

owner Type

The type declaring the method.

methodName string

The method name.

Returns

ConsumerBuilder

This builder.

Values(Type, string)

Registers a method that lists every value of the enum. It must return TEnum[] or IEnumerable<TEnum>. Concord appends the added members to whatever it returns.

public ConsumerBuilder Values(Type owner, string methodName)

Parameters

owner Type

The type declaring the method.

methodName string

The method name.

Returns

ConsumerBuilder

This builder.