Skip to content

KeyReplacementTransformation

public sealed class KeyReplacementTransformation

Namespace: RhoMicro.BindSight.Transformations

Inheritance:

Replaces option model keys.

KeyReplacementTransformation(IKeyReplacementsProvider)
Section titled “KeyReplacementTransformation(IKeyReplacementsProvider)”
public KeyReplacementTransformation(IKeyReplacementsProvider replacementsProvider)

Replaces option model keys.

NameTypeDescription
replacementsProviderIKeyReplacementsProviderThe provider providing key replacements.
Transform(OptionsModel, CancellationToken)
Section titled “Transform(OptionsModel, CancellationToken)”
public ValueTask<OptionsModel?> Transform(OptionsModel model, [CancellationToken cancellationToken = default(CancellationToken)])

Transforms or filters an options model.

NameTypeDescription
cancellationTokenCancellationTokenThe cancellation token used to request cancellation of the transformation.
modelOptionsModelThe model to transform or filter.

A task, that, upon completion, will contain the transformed model, ornull if the options are to be filtered.