C# 클래스 iniParser, Unity_tools

An .ini file parser that Creates and edits .ini files, With functions to fetch and delete values.
파일 보기 프로젝트 열기: kennyist/Unity_tools 1 사용 예제들

공개 메소드들

메소드 설명
Clear ( ) : void

Clear this instance.

Count ( ) : int

How many keys are stored.

DoesExist ( IniFiles, file ) : bool

Returns true if the file exists, or false if it doesnt.

Get ( string key ) : string

Returns the value for the input variable.

Get ( string subSection, string key ) : string

Get the specified key from a subSection. For use if you need to use the same name in differant sections.

GetLine ( string key ) : string[]

Returns the Key, Value, subsection and comment of the choosen variable.

Load ( IniFiles, file ) : void

Load the specified file.

Remove ( string key ) : void

Removes the selected Variable including its value and comment.

Remove ( string subSection, string key ) : void

Remove the specified key from the specified subSection.

Save ( IniFiles, file ) : void

Save the specified file.

Set ( string subSection, string key, string value ) : void

Set the variable and value if they dont exist. Updates the variables value if does exist.

Set ( string subSection, string key, string value, string comment ) : void

Set the variable and value if they dont exist including a comment. Updates the variables value and comment if does exist.

iniParser ( ) : System.Collections.Generic

Initializes a new instance of the iniParser class without loading a file.

iniParser ( IniFiles, file ) : System.Collections.Generic

Initializes a new instance of the iniParser class with loading a file.

메소드 상세

Clear() 공개 메소드

Clear this instance.
public Clear ( ) : void
리턴 void

Count() 공개 메소드

How many keys are stored.
public Count ( ) : int
리턴 int

DoesExist() 공개 메소드

Returns true if the file exists, or false if it doesnt.
public DoesExist ( IniFiles, file ) : bool
file IniFiles, The selected file.
리턴 bool

Get() 공개 메소드

Returns the value for the input variable.
public Get ( string key ) : string
key string The variable name.
리턴 string

Get() 공개 메소드

Get the specified key from a subSection. For use if you need to use the same name in differant sections.
public Get ( string subSection, string key ) : string
subSection string Sub section.
key string Key.
리턴 string

GetLine() 공개 메소드

Returns the Key, Value, subsection and comment of the choosen variable.
public GetLine ( string key ) : string[]
key string The variable name.
리턴 string[]

Load() 공개 메소드

Load the specified file.
public Load ( IniFiles, file ) : void
file IniFiles, The file name.
리턴 void

Remove() 공개 메소드

Removes the selected Variable including its value and comment.
public Remove ( string key ) : void
key string The variable name.
리턴 void

Remove() 공개 메소드

Remove the specified key from the specified subSection.
public Remove ( string subSection, string key ) : void
subSection string Sub section name.
key string The key name
리턴 void

Save() 공개 메소드

Save the specified file.
public Save ( IniFiles, file ) : void
file IniFiles, The file name.
리턴 void

Set() 공개 메소드

Set the variable and value if they dont exist. Updates the variables value if does exist.
public Set ( string subSection, string key, string value ) : void
subSection string The Section this key belongs to
key string The variable nameThe value of the variable
value string
리턴 void

Set() 공개 메소드

Set the variable and value if they dont exist including a comment. Updates the variables value and comment if does exist.
public Set ( string subSection, string key, string value, string comment ) : void
subSection string The Section this key belongs to
key string The variable name
value string
comment string The comment of the variable
리턴 void

iniParser() 공개 메소드

Initializes a new instance of the iniParser class without loading a file.
public iniParser ( ) : System.Collections.Generic
리턴 System.Collections.Generic

iniParser() 공개 메소드

Initializes a new instance of the iniParser class with loading a file.
public iniParser ( IniFiles, file ) : System.Collections.Generic
file IniFiles, Name of the file you want to load.
리턴 System.Collections.Generic