MethodDescriptionclass

Describes a method. We use this class to wrap and return MethodInfo's that are safe to interact with. Returned by `Sandbox.Internal.TypeLibrary` and `Sandbox.TypeDescription`.

object→MemberDescription→MethodDescription
Namespace
Sandbox
Assembly
Sandbox.Reflection
Declaration
public sealed class Sandbox.MethodDescription : Sandbox.MemberDescription

Methods6

Showing 6 methods

public object Invoke(object targetObject, object[] parameters = null)PUBLIC

Invokes this method.

ParameterTypeDescription
targetObjectobjectShould be null if this is static, otherwise should be the object this is a member of.
parameters = nullobject[]An array of parameters to pass. Should be the same length as Parameters
Returns:object—

public T InvokeWithReturn(object targetObject, object[] parameters = null)PUBLIC

Invokes this method and returns a value.

ParameterTypeDescription
targetObjectobjectShould be null if this is static, otherwise should be the object this is a member of.
parameters = nullobject[]An array of parameters to pass. Should be the same length as Parameters
Returns:T—

Properties7

Showing 7 properties

public virtual bool Sandbox.MethodDescription.IsMethod { get; set; }PUBLICVIRTUALGETSET

Returns true - because this is a method

Returns:bool—

public bool Sandbox.MethodDescription.IsOperator { get; set; }PUBLICGETSET

Whether this method implements a recognized overloaded operator or conversion.

Returns:bool—

public bool Sandbox.MethodDescription.IsSpecialName { get; set; }PUBLICGETSET

Returns:bool—

public bool Sandbox.MethodDescription.IsVirtual { get; set; }PUBLICGETSET

Returns:bool—

public System.Reflection.ParameterInfo[]& modreq(System.Runtime.InteropServices.InAttribute) Sandbox.MethodDescription.Parameters { get; set; }PUBLICGETSET

Gets a list of parameters expected by this method

Returns:ParameterInfo[]& modreq(InAttribute)—

public System.Type Sandbox.MethodDescription.ReturnType { get; set; }PUBLICGETSET

Gets the return type of this method.

Returns:Type—

On this page