Table of Contents

Enclose Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/Decorator.cs

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

inner T

The object to extend for non-common extension methods.

throwIfNull bool

true to throw an ArgumentNullException when inner is null; false to allow inner to be null. Default is true.

Returns

Decorator<T>

An instance of Decorator<T>.

Type Parameters

T

The type of the inner to wrap for non-common extension methods.

Exceptions

ArgumentNullException

inner cannot be null.