Table of Contents

Class ProgressDefinitionBuilder<TState>

Namespace
MackySoft.Navigathena
Assembly
MackySoft.Navigathena.dll

Composes producer-owned input types into an application-owned display state.

public sealed class ProgressDefinitionBuilder<TState>

Type Parameters

TState
Inheritance
ProgressDefinitionBuilder<TState>
Inherited Members

Methods

Build()

Captures the current reductions. Later builder changes do not change this definition.

public ProgressDefinition<TState> Build()

Returns

ProgressDefinition<TState>

Reduce<T>(ProgressInput<T>, Func<TState, ProgressUpdate<T>, TState>)

Registers the single reduction for this input. The reducer must return a snapshot without mutating previously published state.

public ProgressDefinitionBuilder<TState> Reduce<T>(ProgressInput<T> input, Func<TState, ProgressUpdate<T>, TState> reduce)

Parameters

input ProgressInput<T>
reduce Func<TState, ProgressUpdate<T>, TState>

Returns

ProgressDefinitionBuilder<TState>

Type Parameters

T

Remarks

Use update.WorkId to preserve separate state for concurrent producers. Reducers run serially on the reporting thread and must be pure: do not report progress or perform display or application side effects from a reducer.