PatternMatchContext<T> Class

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

Syntax

public class PatternMatchContext<T>

Type Parameters

Name Description
T

Methods

Name Value Summary
With(Func<T, bool>, Action) PatternMatchAction<T>
With(Func<T, bool>, Action<T>) PatternMatchAction<T>
With(T, Action) PatternMatchAction<T>
With(T, Action<T>) PatternMatchAction<T>
With<TResult>(Func<T, bool>, Func<T, TResult>) PatternMatch<T, TResult>
With<TResult>(Func<T, bool>, TResult) PatternMatch<T, TResult>
With<TResult>(T, TResult) PatternMatch<T, TResult>

Extension Methods

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