Class RPCInvocation
Contains information about RPCMethod invocation including method itself, target and prepared args. Used as prepared call for RPCManager internally and also may be used externally if you need to do some kind of postprocessing/security checks on invocation.
Inheritance
System.Object
RPCInvocation
Implements
System.IDisposable
Namespace: Eco.Shared.Networking
Assembly: Eco.Shared.dll
Syntax
public sealed class RPCInvocation : ValueType, IDisposable
Constructors
RPCInvocation(RPCMethod, Object, Int32)
Creates RPCInvocation from method and target with null args. These args may be then set to required values with Args span accessor.
Declaration
public RPCInvocation(RPCMethod method, object target, int argsCount)
Parameters
Type | Name | Description |
---|---|---|
RPCMethod | method | |
System.Object | target | |
System.Int32 | argsCount |
Fields
Method
Declaration
public readonly RPCMethod Method
Field Value
Type | Description |
---|---|
RPCMethod |
Target
Declaration
public readonly object Target
Field Value
Type | Description |
---|---|
System.Object |
Properties
Args
Declaration
public Span<object> Args { get; }
Property Value
Type | Description |
---|---|
System.Span<System.Object> |
IsCreated
Declaration
public bool IsCreated { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Dispose()
Returns rented args array back to the pool (for reusing arrays and reducing memory allocations).
Declaration
public void Dispose()
Invoke()
Performs the call.
Declaration
public object Invoke()
Returns
Type | Description |
---|---|
System.Object |
IsAuthorized(INetClient)
Checks if client
has required access to make the invocation.
Declaration
public bool IsAuthorized(INetClient client)
Parameters
Type | Name | Description |
---|---|---|
INetClient | client |
Returns
Type | Description |
---|---|
System.Boolean |
Implements
System.IDisposable