My Project
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
RoslynCSharp.ScriptProxy Class Referenceabstract
Inheritance diagram for RoslynCSharp.ScriptProxy:

Public Member Functions

object Call (string methodName)
 Attempt to call a method on the managed instance with the specifie name. This works in a similar way as UnityEngine.GameObject.SendMessage(string) where the method name is specified. The target method must not accept any arguments. The target method will be called using ProxyCallConvention.Any
 
object Call (string methodName, ProxyCallConvention callConvention)
 Attempt to call a method on the managed instance with the specified name. This works in a similar way as UnityEngine.GameObject.SendMessage(string) where the method name is specified. The target method must not accept any arguments.
 
object Call (string methodName, params object[] arguments)
 Attempt to call a method on the managed instance with the specified name and arguments. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the method name is specified. Any number of arguments may be specified but the target method must expect the arguments. The target method will be called using ProxyCallConvention.Any
 
object Call (string methodName, ProxyCallConvention callConvention, params object[] arguments)
 Attempt to call a method on the managed instance with the specified name and arguments. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the method name is specified. Any number of arguments may be specified but the target method must expect the arguments.
 
object SafeCall (string method)
 Attempt to call a method on the managed instance with the specified name. Any exceptions thrown as a result of locating or calling the method will be caught silently. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the target method name is specified. The target method must not accept any arguments. The target method will be called using ProxyCallConvention.Any
 
object SafeCall (string method, ProxyCallConvention callConvention)
 Attempt to call a method on the managed instance with the specified name. Any exceptions thrown as a result of locating or calling the method will be caught silently. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the target method name is specified. The target method must not accept any arguments.
 
object SafeCall (string method, params object[] arguments)
 Attempt to call a method on the managed instance with the specified name. Any exceptions thrown as a result of locating or calling the method will be caught silently. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the target method name is specified. Any number of arguments may be specified but the target method must expect the arguments. The target method will be called using ProxyCallConvention.Any
 
object SafeCall (string method, ProxyCallConvention callConvention, params object[] arguments)
 Attempt to call a method on the managed instance with the specified name. Any exceptions thrown as a result of locating or calling the method will be caught silently. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the target method name is specified. Any number of arguments may be specified but the target method must expect the arguments.
 
Type GetInstanceType ()
 
virtual T GetInstanceAs< T > (bool throwOnError, T errorValue=default(T))
 Attempts to get the managed instance as the specified generic type.
 
abstract void Dispose ()
 
virtual void MakePersistent ()
 If the managed object is a Unity type then this method will call 'DontDestroyOnLoad' to ensure that the object is able to survie scene loads.
 

Static Public Member Functions

static ScriptProxy CreateScriptProxy (ScriptType type, object instance)
 
static T CreateScriptProxy< T > (ScriptType type, object instance)
 

Protected Member Functions

abstract void ConstructInstance (ScriptType type, object instance)
 
virtual void CheckDisposed ()
 

Properties

abstract ScriptAssembly Assembly [get]
 
abstract ScriptType ScriptType [get]
 
virtual IScriptDataProxy Fields [get]
 Returns the IScriptMemberProxy that provides access to the fields of the wrapped instance.
 
virtual IScriptDataProxy SafeFields [get]
 Returns the IScriptMemberProxy that provides access to the fields of the wrapped instance. Any exceptions thrown when locating or accessing the propery will be handled.
 
virtual IScriptDataProxy Properties [get]
 Returns the IScriptMemberProxy that provides access to the properties of the wrapped instance.
 
virtual IScriptDataProxy SafeProperties [get]
 Returns the IScriptMemberProxy that provides access to the properties of the wrapped instance. Any exceptions thrown when locating or accessing the propery will be handled.
 
virtual IScriptEventProxy Events [get]
 
virtual IScriptEventProxy SafeEvents [get]
 
abstract object Instance [get]
 
virtual UnityEngine.Object UnityInstance [get]
 
virtual UnityEngine.MonoBehaviour MonoBehaviourInstance [get]
 
virtual UnityEngine.ScriptableObject ScriptableObjectInstance [get]
 
virtual bool IsUnityObject [get]
 
virtual bool IsMonoBehaviour [get]
 
virtual bool IsScriptableObject [get]
 
abstract bool IsDisposed [get]
 

Member Function Documentation

◆ Call() [1/4]

object RoslynCSharp.ScriptProxy.Call ( string  methodName)
inline

Attempt to call a method on the managed instance with the specifie name. This works in a similar way as UnityEngine.GameObject.SendMessage(string) where the method name is specified. The target method must not accept any arguments. The target method will be called using ProxyCallConvention.Any

Parameters
methodNameThe name of the method to call
Returns

The value returned from the target method or null if the target method does not return a value

The value returned from the target method or null if the target method does not return a value

Exceptions
ObjectDisposedExceptionThe proxy has already been disposed
TargetExceptionThe target method could not be found on the managed type

◆ Call() [2/4]

object RoslynCSharp.ScriptProxy.Call ( string  methodName,
params object[]  arguments 
)
inline

Attempt to call a method on the managed instance with the specified name and arguments. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the method name is specified. Any number of arguments may be specified but the target method must expect the arguments. The target method will be called using ProxyCallConvention.Any

Parameters
methodNameThe name of the method to call
argumentsThe arguments passed to the method
Returns
The value returned from the target method or null if the target method does not return a value
Exceptions
ObjectDisposedExceptionThe proxy has already been disposed
TargetExceptionThe target method could not be found on the managed type

◆ Call() [3/4]

object RoslynCSharp.ScriptProxy.Call ( string  methodName,
ProxyCallConvention  callConvention 
)
inline

Attempt to call a method on the managed instance with the specified name. This works in a similar way as UnityEngine.GameObject.SendMessage(string) where the method name is specified. The target method must not accept any arguments.

Parameters
methodNameThe name of the method to call
callConventionThe method calling convention
Returns
The value returned from the target method or null if the target method does not return a value
Exceptions
ObjectDisposedExceptionThe proxy has already been disposed
TargetExceptionThe target method could not be found on the managed type

◆ Call() [4/4]

object RoslynCSharp.ScriptProxy.Call ( string  methodName,
ProxyCallConvention  callConvention,
params object[]  arguments 
)
inline

Attempt to call a method on the managed instance with the specified name and arguments. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the method name is specified. Any number of arguments may be specified but the target method must expect the arguments.

Parameters
methodNameThe name of the method to call
callConventionThe method calling convention
argumentsThe arguments passed to the method
Returns
The value returned from the target method or null if the target method does not return a value
Exceptions
ObjectDisposedExceptionThe proxy has already been disposed
TargetExceptionThe target method could not be found on the managed type

◆ CreateScriptProxy< T >()

static T RoslynCSharp.ScriptProxy.CreateScriptProxy< T > ( ScriptType  type,
object  instance 
)
inlinestatic
Type Constraints
T :ScriptProxy 
T :new() 

◆ GetInstanceAs< T >()

virtual T RoslynCSharp.ScriptProxy.GetInstanceAs< T > ( bool  throwOnError,
errorValue = default(T) 
)
inlinevirtual

Attempts to get the managed instance as the specified generic type.

Template Parameters
TThe generic type to return the instance as
Parameters
throwOnErrorWhen false, any exceptions caused by the conversion will be caught and will result in a default value being returned. When true, any exceptions will not be handled.
errorValueThe value to return when 'throwOnError' is false and an error occurs"/>
Returns
The managed instance as the specified generic type or the default value for the generic type if an error occured

◆ SafeCall() [1/4]

object RoslynCSharp.ScriptProxy.SafeCall ( string  method)
inline

Attempt to call a method on the managed instance with the specified name. Any exceptions thrown as a result of locating or calling the method will be caught silently. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the target method name is specified. The target method must not accept any arguments. The target method will be called using ProxyCallConvention.Any

Parameters
methodThe name of the method to call
Returns
The value returned from the target method or null if the target method does not return a value

◆ SafeCall() [2/4]

object RoslynCSharp.ScriptProxy.SafeCall ( string  method,
params object[]  arguments 
)
inline

Attempt to call a method on the managed instance with the specified name. Any exceptions thrown as a result of locating or calling the method will be caught silently. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the target method name is specified. Any number of arguments may be specified but the target method must expect the arguments. The target method will be called using ProxyCallConvention.Any

Parameters
methodThe name of the method to call
argumentsThe arguments passed to the method
Returns
The value returned from the target method or null if the target method does not return a value

◆ SafeCall() [3/4]

object RoslynCSharp.ScriptProxy.SafeCall ( string  method,
ProxyCallConvention  callConvention 
)
inline

Attempt to call a method on the managed instance with the specified name. Any exceptions thrown as a result of locating or calling the method will be caught silently. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the target method name is specified. The target method must not accept any arguments.

Parameters
methodThe name of the method to call
callConventionThe method calling convention
Returns
The value returned from the target method or null if the target method does not return a value

◆ SafeCall() [4/4]

object RoslynCSharp.ScriptProxy.SafeCall ( string  method,
ProxyCallConvention  callConvention,
params object[]  arguments 
)
inline

Attempt to call a method on the managed instance with the specified name. Any exceptions thrown as a result of locating or calling the method will be caught silently. This works in a similar was as UnityEngine.GameObject.SendMessage(string) where the target method name is specified. Any number of arguments may be specified but the target method must expect the arguments.

Parameters
methodThe name of the method to call
callConventionThe method calling convention
argumentsThe arguments passed to the method
Returns
The value returned from the target method or null if the target method does not return a value

Property Documentation

◆ Fields

virtual IScriptDataProxy RoslynCSharp.ScriptProxy.Fields
get

Returns the IScriptMemberProxy that provides access to the fields of the wrapped instance.

Exceptions
System.ObjectDisposedExceptionThe proxy has already been disposed

◆ Properties

virtual IScriptDataProxy RoslynCSharp.ScriptProxy.Properties
get

Returns the IScriptMemberProxy that provides access to the properties of the wrapped instance.

Exceptions
System.ObjectDisposedExceptionThe proxy has already been disposed

The documentation for this class was generated from the following file: