Show / Hide Table of Contents

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

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾