C# Class NPLMono.NPLObjectProxy

/** NPL object proxy. This is both a smart pointer and accessors // Example 1: Create NPLTable and serialize to string NPLObjectProxy msg = new NPLObjectProxy(); msg["nid"].Assign(10); msg["name"].Assign("value"); msg["tab"]["name1"].Assign("value1"); StringBuilder output = new StringBuilder(); NPLHelper.NPLTableToString(null, msg, output); // Example 2: serialized NPLTable from string. NPLObjectProxy tabMsg = NPLHelper.StringToNPLTable("{nid=10, name=\"value\", tab={name1=\"value1\"}}"); ParaGlobal.applog(String.Format("Example 5: {0}==10, {1}==value, {2}==value1", (double)tabMsg["nid"], (string)tabMsg["name"], (string)(tabMsg["tab"]["name1"])));
Inheritance: System.Collections.IEnumerable
Exibir arquivo Open project: LiXizhi/NPLRuntime Class Usage Examples

Public Methods

Method Description
Assign ( NPLObjectProxy value ) : void
Assign ( bool value ) : void
Assign ( double value ) : void
Assign ( int value ) : void
Assign ( string value ) : void
GetEnumerator ( ) : System.Collections.IEnumerator
GetMyType ( ) : NPLObjectType
MakeNil ( ) : void
NPLObjectProxy ( )
NPLObjectProxy ( NPLObjectBase obj )
get ( ) : NPLObjectBase
this ( int nIndex ) : NPLObjectProxy
this ( string sName ) : NPLObjectProxy

Private Methods

Method Description
GetField ( string sName ) : NPLObjectProxy

Method Details

Assign() public method

public Assign ( NPLObjectProxy value ) : void
value NPLObjectProxy
return void

Assign() public method

public Assign ( bool value ) : void
value bool
return void

Assign() public method

public Assign ( double value ) : void
value double
return void

Assign() public method

public Assign ( int value ) : void
value int
return void

Assign() public method

public Assign ( string value ) : void
value string
return void

GetEnumerator() public method

public GetEnumerator ( ) : System.Collections.IEnumerator
return System.Collections.IEnumerator

GetMyType() public method

public GetMyType ( ) : NPLObjectType
return NPLObjectType

MakeNil() public method

public MakeNil ( ) : void
return void

NPLObjectProxy() public method

public NPLObjectProxy ( )

NPLObjectProxy() public method

public NPLObjectProxy ( NPLObjectBase obj )
obj NPLObjectBase

get() public method

public get ( ) : NPLObjectBase
return NPLObjectBase

this() public method

public this ( int nIndex ) : NPLObjectProxy
nIndex int
return NPLObjectProxy

this() public method

public this ( string sName ) : NPLObjectProxy
sName string
return NPLObjectProxy