C# 클래스 NPLMono.NPLHelper

파일 보기 프로젝트 열기: LiXizhi/NPLRuntime

공개 메소드들

메소드 설명
DeserializePureNPLDataBlock ( NPLLex ls, NPLObjectProxy &objProxy ) : bool
EncodeStringInQuotation ( string str ) : string

replace quotation mark in string e.g. "\" will be converted to \"\\\"

EncodeStringInQuotation ( StringBuilder &buff, int nOutputOffset, string input ) : void

this is something like string.format("%q") in NPL. [thread-safe] replace quotation mark in string. e.g. "\" will be converted to \"\\\"

EncodeStringInQuotationFix ( string str ) : string

this version is the same as EncodeStringInQuotation, except that it is in use on the server side. the server side sees \r as " ". This is a client/server fix for a bug of xml transmission of \r in .net 2.

MsgStringToNPLTable ( string input ) : NPLObjectProxy

same as StringToNPLTable(), except that it begins with "msg={...}"

NPLTableToString ( string sStorageVar, NPLObjectProxy input, StringBuilder sCode ) : bool
NPLTableToString ( string sStorageVar, NPLObjectProxy input, StringBuilder sCode, int nCodeOffset ) : bool
SerializeNPLTableToString ( string sStorageVar, NPLObjectProxy input, StringBuilder sCode, int nCodeOffset ) : bool

safe convert the NPL table to string. if the input is nil, output is not assigned.

StringToNPLTable ( string input ) : NPLObjectProxy

converting string to NPL table object

메소드 상세

DeserializePureNPLDataBlock() 공개 정적인 메소드

public static DeserializePureNPLDataBlock ( NPLLex ls, NPLObjectProxy &objProxy ) : bool
ls NPLLex
objProxy NPLObjectProxy
리턴 bool

EncodeStringInQuotation() 공개 정적인 메소드

replace quotation mark in string e.g. "\" will be converted to \"\\\"
public static EncodeStringInQuotation ( string str ) : string
str string if nil, it will return "nil"
리턴 string

EncodeStringInQuotation() 공개 정적인 메소드

this is something like string.format("%q") in NPL. [thread-safe] replace quotation mark in string. e.g. "\" will be converted to \"\\\"
public static EncodeStringInQuotation ( StringBuilder &buff, int nOutputOffset, string input ) : void
buff StringBuilder into which buffer to write the output
nOutputOffset int the output will be written to output[nOutputOffset]. default to 0,which is the beginning
input string the input string to be encoded
리턴 void

EncodeStringInQuotationFix() 공개 정적인 메소드

this version is the same as EncodeStringInQuotation, except that it is in use on the server side. the server side sees \r as " ". This is a client/server fix for a bug of xml transmission of \r in .net 2.
public static EncodeStringInQuotationFix ( string str ) : string
str string
리턴 string

MsgStringToNPLTable() 공개 정적인 메소드

same as StringToNPLTable(), except that it begins with "msg={...}"
public static MsgStringToNPLTable ( string input ) : NPLObjectProxy
input string such as "msg={nid=10, name=\"value\", tab={name1=\"value1\"}}"
리턴 NPLObjectProxy

NPLTableToString() 공개 정적인 메소드

public static NPLTableToString ( string sStorageVar, NPLObjectProxy input, StringBuilder sCode ) : bool
sStorageVar string
input NPLObjectProxy
sCode StringBuilder
리턴 bool

NPLTableToString() 공개 정적인 메소드

public static NPLTableToString ( string sStorageVar, NPLObjectProxy input, StringBuilder sCode, int nCodeOffset ) : bool
sStorageVar string
input NPLObjectProxy
sCode StringBuilder
nCodeOffset int
리턴 bool

SerializeNPLTableToString() 공개 정적인 메소드

safe convert the NPL table to string. if the input is nil, output is not assigned.
public static SerializeNPLTableToString ( string sStorageVar, NPLObjectProxy input, StringBuilder sCode, int nCodeOffset ) : bool
sStorageVar string if null, output is pure table{}, otherwise it is sStorageVar={}
input NPLObjectProxy
sCode StringBuilder
nCodeOffset int
리턴 bool

StringToNPLTable() 공개 정적인 메소드

converting string to NPL table object
public static StringToNPLTable ( string input ) : NPLObjectProxy
input string such as "{nid=10, name=\"value\", tab={name1=\"value1\"}}"
리턴 NPLObjectProxy