PatternMatchSingleContext<T> Class

Namespace
FunctionalSharp.PatternMatching
Base Types
  • object
graph TD Base0["object"]-->Type Type["PatternMatchSingleContext<T>"] class Type type-node

Syntax

public class PatternMatchSingleContext<T>

Type Parameters

Name Description
T

Methods

Name Value Summary
With(Func<T, bool>, Action) PatternMatchSingleAction<T>
With(T, Action) PatternMatchSingleAction<T>
With<TResult>(Func<T, bool>, Func<T, TResult>) PatternMatchSingle<T, TResult>
With<TResult>(Func<T, bool>, TResult) PatternMatchSingle<T, TResult>
With<TResult>(T, Func<T, TResult>) PatternMatchSingle<T, TResult>
With<TResult>(T, TResult) PatternMatchSingle<T, TResult>

Extension Methods

Name Value Summary
Match<PatternMatchSingleContext<T>>() PatternMatchSingleContext<T>
Starts a pattern match for a single value. Subsequent calls to With() need to be used to specify conditions
ToOption<PatternMatchSingleContext<T>>() IOption<T>
Turns the type T into an option type.