Table of Contents

UseWrapper Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/ObjectExtensions.cs

UseWrapper<T>(T, Action<IDictionary<string, object>>)

Wrap and extend an existing object of T with additional data.

public static IWrapper<T> UseWrapper<T>(this T instance, Action<IDictionary<string, object>> extender = null)

Parameters

instance T

The instance to wrap and extend.

extender Action<IDictionary<string, object>>

The delegate that provides an easy way of supplying additional data to an object.

Returns

IWrapper<T>

An implementation of IWrapper<T> encapsulating the specified instance.

Type Parameters

T

The type of the object to extend.

UseWrapper<T>(T, MemberInfo, Action<IDictionary<string, object>>)

Wrap and extend an existing object of T with additional data.

public static IWrapper<T> UseWrapper<T>(this T instance, MemberInfo memberReference, Action<IDictionary<string, object>> extender = null)

Parameters

instance T

The instance to wrap and extend.

memberReference MemberInfo

The optional member reference to assign MemberReference.

extender Action<IDictionary<string, object>>

The delegate that provides an easy way of supplying additional data to an object.

Returns

IWrapper<T>

An implementation of IWrapper<T> encapsulating the specified instance.

Type Parameters

T

The type of the object to extend.