Skip to content

RequestBase Methods

Base type used for method requests.

Dispose

abstract
public abstract void Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetActivityName

abstract
public abstract string GetActivityName()
Gets the activity name, which refers to both the interface name and method name.

GetArgument(int)

virtual
View source
public virtual object GetArgument(int index)
Gets the argument at the specified index.

Parameters

indexint
The argument index.

Returns

The argument at the specified index.

GetCancellationToken

virtual
View source
public virtual CancellationToken GetCancellationToken()
Gets the cancellation token for this request. If the request does not accept a cancellation token, this will be System.Threading.CancellationToken.None.

Returns

The cancellation token for this request.

GetInterfaceName

abstract
public abstract string GetInterfaceName()
Gets the full interface name.

GetInterfaceType

abstract
public abstract Type GetInterfaceType()
Gets the interface type.

GetMethod

abstract
public abstract MethodInfo GetMethod()
Gets the method info object, which may be null.

GetMethodName

abstract
public abstract string GetMethodName()
Gets the method name.

GetTarget

abstract
public abstract object GetTarget()
Gets the invocation target.

Returns

The invocation target.

Invoke

abstract
public abstract ValueTask<Response> Invoke()
Invoke the object.

SetArgument(int, object)

virtual
View source
public virtual void SetArgument(int index, object value)
Sets the argument at the specified index.

Parameters

indexint
The argument index.
valueobject
The argument value

SetTarget(ITargetHolder)

abstract
public abstract void SetTarget(ITargetHolder holder)
Sets the invocation target from an instance of ITargetHolder.

Parameters

holderITargetHolder
The invocation target.

ToString

override
View source
public override string ToString()
Returns a string that represents the current object.

Returns

A string that represents the current object.

TryCancel

virtual
View source
public virtual bool TryCancel()
Tries to cancel the invocation.

Returns

true if cancellation was requested, otherwise false.