Show / Hide Table of Contents

Class DelegateProxyFactory<TProxy, TTarget>

Implementation of IProxyFactory taking two delegates for simple instancing of proxies.

Inheritance
System.Object
DelegateProxyFactory<TProxy, TTarget>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class DelegateProxyFactory<TProxy, TTarget> : IProxyFactory<TProxy, TTarget>, IProxyFactory where TProxy : class where TTarget : class
Type Parameters
TProxy

The type of the proxy.

TTarget

The type of the target.

Constructors

DelegateProxyFactory(Func<TTarget, TProxy>)

Initializes a new instance of the DelegateProxyFactory<TProxy, TTarget> class.

Declaration
public DelegateProxyFactory(Func<TTarget, TProxy> wrapDelegate)
Parameters
Func<TTarget, TProxy> wrapDelegate

The proxy.

Properties

ProxyType

Gets the proxy type

Declaration
public Type ProxyType { get; }
Property Value
Type

Implements
IProxyFactory.ProxyType

TargetType

Gets the proxied type

Declaration
public Type TargetType { get; }
Property Value
Type

Implements
IProxyFactory.TargetType

Methods

CreateProxyObject(TTarget)

Takes an instance of a target object and returns a proxy object wrapping it

Declaration
public TProxy CreateProxyObject(TTarget target)
Parameters
TTarget target

Returns
TProxy

Implements
IProxyFactory<TProxy, TTarget>.CreateProxyObject(TTarget)

CreateProxyObject(Object)

Takes an instance of a target object and returns a proxy object wrapping it

Declaration
public object CreateProxyObject(object o)
Parameters
System.Object o

Returns
System.Object

Implements
IProxyFactory.CreateProxyObject(Object)
Back to top Built by Itinero, MIT licensed.