Enclose Method
Definition
Enclose<T>(T, bool)
Encloses the specified inner so that it can be extended by non-common extension methods.
public static Decorator<T> Enclose<T>(T inner, bool throwIfNull = true)
Parameters
innerTThe object to extend for non-common extension methods.
throwIfNullbooltrueto throw an ArgumentNullException wheninneris null;falseto allowinnerto be null. Default istrue.
Returns
- Decorator<T>
An instance of Decorator<T>.
Type Parameters
TThe type of the
innerto wrap for non-common extension methods.
Exceptions
- ArgumentNullException
innercannot be null.