Class InvocationContext

The default implementation of the IInvocationContext interface.

Inheritance
System.Object
InvocationContext
Implements
IInvocationContext
Namespace: Solti.Utils.Proxy.Internals
Assembly: Solti.Utils.Proxy.dll
Syntax
public sealed class InvocationContext : Object, IInvocationContext
Remarks

Creates a new InvocationContext instance.

Constructors

InvocationContext(Object, ExtendedMemberInfo, Func<Object[], Object>, Object[], IReadOnlyList<Type>)

The default implementation of the IInvocationContext interface.

Declaration
public InvocationContext(object proxy, ExtendedMemberInfo targetMember, Func<object[], object> dispatch, object[] args, IReadOnlyList<Type> genericArguments)
Parameters
Type Name Description
System.Object proxy
ExtendedMemberInfo targetMember
System.Func<System.Object[], System.Object> dispatch
System.Object[] args
System.Collections.Generic.IReadOnlyList<System.Type> genericArguments
Remarks

Creates a new InvocationContext instance.

Properties

Args

The arguments passed by the caller.

Declaration
public object[] Args { get; }
Property Value
Type Description
System.Object[]
Remarks

Before the target gets called you may use this property to inspect or modify parameters passed by the caller. After it you can read or amend the "by ref" parameters set by the target method.

Dispatch

Gets the dispatcher function.

Declaration
public Func<object[], object> Dispatch { get; }
Property Value
Type Description
System.Func<System.Object[], System.Object>

GenericArguments

Generic arguments supplied by the caller.

Declaration
public IReadOnlyList<Type> GenericArguments { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyList<System.Type>

Member

The member (property, event or method) that is being proxied.

Declaration
public ExtendedMemberInfo Member { get; }
Property Value
Type Description
ExtendedMemberInfo

Proxy

The proxy object on which the call was made.

Declaration
public object Proxy { get; }
Property Value
Type Description
System.Object

Explicit Interface Implementations

IInvocationContext.Dispatch()

Declaration
object IInvocationContext.Dispatch()
Returns
Type Description
System.Object

Implements

IInvocationContext
In This Article
Back to top Generated by DocFX