Table of Contents

Class PurePathSwitchExtensions

Namespace
Olve.Paths
Assembly
Olve.Paths.dll

Provides functional switch methods for IPurePath implementations.

public static class PurePathSwitchExtensions
Inheritance
PurePathSwitchExtensions
Inherited Members

Methods

Switch<T>(IPurePath, Action<T>, Action?)

Executes an action if the IPurePath is of the given type.

public static void Switch<T>(this IPurePath path, Action<T> action, Action? fallback = null) where T : IPurePath

Parameters

path IPurePath
action Action<T>
fallback Action

Type Parameters

T

Switch<T1, T2>(IPurePath, Action<T1>, Action<T2>, Action?)

Executes one of two actions based on the type of IPurePath.

public static void Switch<T1, T2>(this IPurePath path, Action<T1> action1, Action<T2> action2, Action? fallback = null) where T1 : IPurePath where T2 : IPurePath

Parameters

path IPurePath
action1 Action<T1>
action2 Action<T2>
fallback Action

Type Parameters

T1
T2

Switch<T1, T2, T3>(IPurePath, Action<T1>, Action<T2>, Action<T3>, Action?)

Executes one of three actions based on the type of IPurePath.

public static void Switch<T1, T2, T3>(this IPurePath path, Action<T1> action1, Action<T2> action2, Action<T3> action3, Action? fallback = null) where T1 : IPurePath where T2 : IPurePath where T3 : IPurePath

Parameters

path IPurePath
action1 Action<T1>
action2 Action<T2>
action3 Action<T3>
fallback Action

Type Parameters

T1
T2
T3