Class GenericExtensions
- Namespace
- Mithril.Core.Extensions
- Assembly
- Mithril.Core.dll
Generic Extensions
public static class GenericExtensions
- Inheritance
-
GenericExtensions
- Inherited Members
Methods
When<TObject>(TObject, bool, Func<TObject, TObject>)
Whens the predicate is true, run the method.
public static TObject When<TObject>(this TObject obj, bool predicate, Func<TObject, TObject> method)
Parameters
obj
TObjectThe object.
predicate
boolif set to
true
[predicate].method
Func<TObject, TObject>The method to run if true.
Returns
- TObject
The builder.
Type Parameters
TObject
The type of the object.