Sansar Docs
Ask or search…
K

Reflective

Reflective Attribute, Context, and Base.

Reflective

Reflective Class
Base class which provides for simple reflection of methods through a given interface.

Syntax

public class Reflective

Member Details

Reflective Constructor

Default constructor.

Syntax

protected Reflective ()

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

AllowedContexts Property

Internal Use Only. Overridden by subclasses to return only those contexts requested which are allowed for that type of script.

Syntax

Value
Documentation for this section has not yet been entered.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

AsInterface Generic Method

Returns a TInterface object if one can be created, null otherwise

Syntax

[Sansar.Script.NonReflective] public TInterface AsInterface () where TInterface : class
Type Parameters
TInterface
The interface describing the methods and properties desired.
Returns
A TInterface instance if this object is compatible. An object is compatible if it implements the interface or has public methods and properties which match TInterface.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

FullInterface Method

Generates a string which shows all the members which can be reflected.

Syntax

[Sansar.Script.NonReflective] public string FullInterface (string interfaceName)
Parameters
interfaceName
The name to give the generated interface class in the output.
Returns
The generated string. If no members can be reflected, returns the empty string

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

ReflectiveContexts Property

Override ReflectiveContexts to limit which contexts this Reflective interface is available in when registered with.

Syntax

[Sansar.Script.NonReflective] protected virtual Reflective.Context ReflectiveContexts { get; }
Value
Documentation for this section has not yet been entered.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

ReflectiveName Property

Override ReflectiveName to change which name this class will be registered as in the Reflective system.

Syntax

[Sansar.Script.NonReflective] protected virtual string ReflectiveName { get; }
Value
Documentation for this section has not yet been entered.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

Register Method

Syntax

[Sansar.Script.NonReflective] public void Register ()

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

Unregister Method

Syntax

[Sansar.Script.NonReflective] public void Unregister ()

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

Reflective+Context

Reflective.Context Enum

Use with Sansar.Script.RegisterReflectiveAttribute and Reflective.Register(Sansar.Script.Reflective.Context) to specify specific access context for the registered reflective class.

Syntax

[System.Flags] public enum Reflective.Context

Remarks

Documentation for this section has not yet been entered.

Members

Member Name
Description
All
All contexts.
None
Not discoverable via FindReflective or FindScript
ObjectPrivate
Works only for running scripts, makes them findable in ObjectPrivate.FindScript and ObjectPrivate.FindScripts.
ScenePrivate
Findable in ScenePrivate.FindReflective
ScenePublic
Findable in ScenePublic.FindReflective

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

Reflective.ReflectiveBase Class

Internal support class.

Syntax

public class Reflective.ReflectiveBase

Member Details

Reflective.ReflectiveBase Constructor

Documentation for this section has not yet been entered.

Syntax

public Reflective.ReflectiveBase ()

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

originalObject Field

Wrapped object.

Syntax

protected object originalObject

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0