IProxyFactory Interface

Glimpse API

IProxyFactory Interface Glimpse API Documentation

Definition of a factory that can create proxies of given objects/types. Factory supports wrapping a interfaces, wrapping a class or extending a class.

Wrapping takes a target instance, generates a new type that extends the input types and injects the target object within the new instance. Extends takes a type and generates a new type that extends it.

Namespace: Glimpse.Core.Extensibility
Assembly: Glimpse.Core (in Glimpse.Core.dll) Version: (1.0.1)


public interface IProxyFactory
public interface IProxyFactory

When selecting a class to wrap or extend, it is important to know what constructors you have and whether a default constructor is available.

When a method is called on a wrapped target, it is important to note that once the targets version of that method is called, no other method on the proxy will be called. This can become important if you are try to wrap multiple methods where one calls the other.

When a method is called on a extended class, it is important to note that the new class will behave differently to that of a wrapped classes. Meaning that if you have multiple methods that you are providing alternates for, if one calls the other, the alternate will be called on both methods.

See Also