Table of Contents

Operator implicit operator

Namespace
Velvet
Assembly
Velvet.Docs.dll

implicit operator Action<T>(StateUpdater<T>)

Implicit conversion to the direct value-setter System.Action<T> so the setter can be stored in / passed as an Action<T> (e.g. a callback parameter) and invoked with value-call syntax. The returned delegate is the cached, reference-stable value-setter.

public static implicit operator Action<T>(StateUpdater<T> updater)

Parameters

updater StateUpdater<T>

The setter to convert.

Returns

Action<T>

implicit operator Action<Func<T, T>>(StateUpdater<T>)

Implicit conversion to the functional-updater System.Action<T> of Func<T, T>, for callers that want to pass the prev => next form as a delegate.

public static implicit operator Action<Func<T, T>>(StateUpdater<T> updater)

Parameters

updater StateUpdater<T>

The setter to convert.

Returns

Action<Func<T, T>>