C# Class Webgame.Utility.ConfigOperator

显示文件 Open project: kofight/CapsUnity Class Usage Examples

Public Methods

Method Description
ConfigOperator ( ) : System
ConfigOperator ( string path ) : System
Dispose ( ) : void
GetBoolValue ( string key ) : bool
GetBoolValue ( string key, bool &value ) : bool
GetFloatValue ( string key, float &value ) : bool
GetFloatValue ( string key ) : float
GetIntValue ( string key, int &value ) : bool
GetIntValue ( string key ) : int
GetStringValue ( string key, string &value ) : bool
GetStringValue ( string key ) : string
Read ( ) : bool
Read ( string content, bool clearExist = true ) : void
ReadTextTable ( string content, string split ) : List

将列表格式的文本文件读到内存中.

Save ( ) : void
Write ( string key, object values, string description = "" ) : void

向配置文件中写入一条记录.

Method Details

ConfigOperator() public method

public ConfigOperator ( ) : System
return System

ConfigOperator() public method

public ConfigOperator ( string path ) : System
path string
return System

Dispose() public method

public Dispose ( ) : void
return void

GetBoolValue() public method

public GetBoolValue ( string key ) : bool
key string
return bool

GetBoolValue() public method

public GetBoolValue ( string key, bool &value ) : bool
key string
value bool
return bool

GetFloatValue() public method

public GetFloatValue ( string key, float &value ) : bool
key string
value float
return bool

GetFloatValue() public method

public GetFloatValue ( string key ) : float
key string
return float

GetIntValue() public method

public GetIntValue ( string key, int &value ) : bool
key string
value int
return bool

GetIntValue() public method

public GetIntValue ( string key ) : int
key string
return int

GetStringValue() public method

public GetStringValue ( string key, string &value ) : bool
key string
value string
return bool

GetStringValue() public method

public GetStringValue ( string key ) : string
key string
return string

Read() public method

public Read ( ) : bool
return bool

Read() public method

public Read ( string content, bool clearExist = true ) : void
content string
clearExist bool
return void

ReadTextTable() public method

将列表格式的文本文件读到内存中.
public ReadTextTable ( string content, string split ) : List
content string
split string 分隔符:制表符 空格
return List

Save() public method

public Save ( ) : void
return void

Write() public method

向配置文件中写入一条记录.
public Write ( string key, object values, string description = "" ) : void
key string
values object
description string 注释.
return void