FlagValue<T> Class

Implementation of a flag with an optional value.
public sealed class FlagValue<T> : IFlagValue
Interfaces

Parameters

T
The flag's element type.

Properties

bool IsSet
Gets or sets a value indicating whether or not the flag was set or not.
T Value
Gets or sets the flag's value.

Methods

override string ToString()

Extension Methods

T And<FlagValue<T>>(Action<FlagValue<T>>)
Performs the specified action on the given object and then returns the object. Useful for fluent testing patterns where additional assertions or operations are chained together in a readable manner.