C# 클래스 Rhino.Delegator

This is a helper class for implementing wrappers around Scriptable objects.
This is a helper class for implementing wrappers around Scriptable objects. It implements the Function interface and delegates all invocations to a delegee Scriptable object. The normal use of this class involves creating a sub-class and overriding one or more of the methods. A useful application is the implementation of interceptors, pre/post conditions, debugging.
상속: System.Function
파일 보기 프로젝트 열기: hazzik/Rhino.Net

보호된 프로퍼티들

프로퍼티 타입 설명
obj Scriptable

공개 메소드들

메소드 설명
Call ( Context cx, Scriptable scope, Scriptable thisObj, object args ) : object
Construct ( Context cx, Scriptable scope, object args ) : Scriptable

Note that if the delegee is null, this method creates a new instance of the Delegator itself rathert than forwarding the call to the delegee.

Note that if the delegee is null, this method creates a new instance of the Delegator itself rathert than forwarding the call to the delegee. This permits the use of Delegator prototypes.

Delegator ( ) : System

Create a Delegator prototype.

Create a Delegator prototype. This constructor should only be used for creating prototype objects of Delegator.

Delegator ( Scriptable obj ) : System

Create a new Delegator that forwards requests to a delegee Scriptable object.

Create a new Delegator that forwards requests to a delegee Scriptable object.

Delete ( int index ) : void
Delete ( string name ) : void
Get ( int index, Scriptable start ) : object
Get ( string name, Scriptable start ) : object
GetClassName ( ) : string
GetDefaultValue ( Type hint ) : object

Note that this method does not get forwarded to the delegee if the hint parameter is null, ScriptRuntime.ScriptableClass or ScriptRuntime.FunctionClass.

Note that this method does not get forwarded to the delegee if the hint parameter is null, ScriptRuntime.ScriptableClass or ScriptRuntime.FunctionClass. Instead the object itself is returned.

GetDelegee ( ) : Scriptable

Retrieve the delegee.

Retrieve the delegee.

GetIds ( ) : object[]
GetParentScope ( ) : Scriptable
GetPrototype ( ) : Scriptable
Has ( int index, Scriptable start ) : bool
Has ( string name, Scriptable start ) : bool
HasInstance ( Scriptable instance ) : bool
Put ( int index, Scriptable start, object value ) : void
Put ( string name, Scriptable start, object value ) : void
SetDelegee ( Scriptable obj ) : void

Set the delegee.

Set the delegee.

SetParentScope ( Scriptable parent ) : void
SetPrototype ( Scriptable prototype ) : void

보호된 메소드들

메소드 설명
NewInstance ( ) : Delegator

Crete new Delegator instance.

Crete new Delegator instance. The default implementation calls this.getClass().newInstance().

메소드 상세

Call() 공개 메소드

public Call ( Context cx, Scriptable scope, Scriptable thisObj, object args ) : object
cx Context
scope Scriptable
thisObj Scriptable
args object
리턴 object

Construct() 공개 메소드

Note that if the delegee is null, this method creates a new instance of the Delegator itself rathert than forwarding the call to the delegee.
Note that if the delegee is null, this method creates a new instance of the Delegator itself rathert than forwarding the call to the delegee. This permits the use of Delegator prototypes.
public Construct ( Context cx, Scriptable scope, object args ) : Scriptable
cx Context the current Context for this thread
scope Scriptable /// an enclosing scope of the caller except /// when the function is called from a closure. ///
args object the array of arguments
리턴 Scriptable

Delegator() 공개 메소드

Create a Delegator prototype.
Create a Delegator prototype. This constructor should only be used for creating prototype objects of Delegator.
public Delegator ( ) : System
리턴 System

Delegator() 공개 메소드

Create a new Delegator that forwards requests to a delegee Scriptable object.
Create a new Delegator that forwards requests to a delegee Scriptable object.
public Delegator ( Scriptable obj ) : System
obj Scriptable the delegee
리턴 System

Delete() 공개 메소드

public Delete ( int index ) : void
index int
리턴 void

Delete() 공개 메소드

public Delete ( string name ) : void
name string
리턴 void

Get() 공개 메소드

public Get ( int index, Scriptable start ) : object
index int
start Scriptable
리턴 object

Get() 공개 메소드

public Get ( string name, Scriptable start ) : object
name string
start Scriptable
리턴 object

GetClassName() 공개 메소드

public GetClassName ( ) : string
리턴 string

GetDefaultValue() 공개 메소드

Note that this method does not get forwarded to the delegee if the hint parameter is null, ScriptRuntime.ScriptableClass or ScriptRuntime.FunctionClass.
Note that this method does not get forwarded to the delegee if the hint parameter is null, ScriptRuntime.ScriptableClass or ScriptRuntime.FunctionClass. Instead the object itself is returned.
public GetDefaultValue ( Type hint ) : object
hint System.Type the type hint
리턴 object

GetDelegee() 공개 메소드

Retrieve the delegee.
Retrieve the delegee.
public GetDelegee ( ) : Scriptable
리턴 Scriptable

GetIds() 공개 메소드

public GetIds ( ) : object[]
리턴 object[]

GetParentScope() 공개 메소드

public GetParentScope ( ) : Scriptable
리턴 Scriptable

GetPrototype() 공개 메소드

public GetPrototype ( ) : Scriptable
리턴 Scriptable

Has() 공개 메소드

public Has ( int index, Scriptable start ) : bool
index int
start Scriptable
리턴 bool

Has() 공개 메소드

public Has ( string name, Scriptable start ) : bool
name string
start Scriptable
리턴 bool

HasInstance() 공개 메소드

public HasInstance ( Scriptable instance ) : bool
instance Scriptable
리턴 bool

NewInstance() 보호된 메소드

Crete new Delegator instance.
Crete new Delegator instance. The default implementation calls this.getClass().newInstance().
protected NewInstance ( ) : Delegator
리턴 Delegator

Put() 공개 메소드

public Put ( int index, Scriptable start, object value ) : void
index int
start Scriptable
value object
리턴 void

Put() 공개 메소드

public Put ( string name, Scriptable start, object value ) : void
name string
start Scriptable
value object
리턴 void

SetDelegee() 공개 메소드

Set the delegee.
Set the delegee.
public SetDelegee ( Scriptable obj ) : void
obj Scriptable the delegee
리턴 void

SetParentScope() 공개 메소드

public SetParentScope ( Scriptable parent ) : void
parent Scriptable
리턴 void

SetPrototype() 공개 메소드

public SetPrototype ( Scriptable prototype ) : void
prototype Scriptable
리턴 void

프로퍼티 상세

obj 보호되어 있는 프로퍼티

protected Scriptable obj
리턴 Scriptable