C# 클래스 Nexus.Client.Games.Steam.KeyValue

Represents a recursive string key to arbitrary value container.
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Invalid KeyValue

공개 메소드들

메소드 설명
AsBoolean ( bool defaultValue ) : bool

Attempts to convert and return the value of this instance as a boolean. If the conversion is invalid, the default value is returned.

AsFloat ( float defaultValue ) : float

Attempts to convert and return the value of this instance as a float. If the conversion is invalid, the default value is returned.

AsInteger ( int defaultValue ) : int

Attempts to convert and return the value of this instance as an integer. If the conversion is invalid, the default value is returned.

AsLong ( long defaultValue ) : long

Attempts to convert and return the value of this instance as a long. If the conversion is invalid, the default value is returned.

AsString ( ) : string

Returns the value of this instance as a string.

KeyValue ( string name, string value ) : System

Initializes a new instance of the KeyValue class.

LoadAsBinary ( string path ) : KeyValue

Attempts to load the given filename as a binary KeyValue.

This method will swallow any exceptions that occur when reading, use ReadAsBinary if you wish to handle exceptions.

LoadAsText ( string path ) : KeyValue

Attempts to load the given filename as a text KeyValue.

This method will swallow any exceptions that occur when reading, use ReadAsText if you wish to handle exceptions.

LoadFromString ( string input ) : KeyValue

Attempts to create an instance of KeyValue from the given input text.

This method will swallow any exceptions that occur when reading, use ReadAsText if you wish to handle exceptions.

ReadAsBinary ( Stream input ) : bool

Populate this instance from the given Stream as a binary KeyValue.

ReadAsText ( Stream input ) : bool

Populate this instance from the given Stream as a text KeyValue.

ReadFileAsText ( string filename ) : bool

Opens and reads the given filename as text.

SaveToFile ( string path, bool asBinary ) : void

Saves this instance to file.

ToString ( ) : string

Returns a System.String that represents this instance.

this ( string key ) : KeyValue

Gets the child KeyValue with the specified key. If no child with this key exists, Invalid is returned.

비공개 메소드들

메소드 설명
LoadFromFile ( string path, bool asBinary ) : KeyValue
RecursiveLoadFromBuffer ( KvTextReader kvr ) : void
RecursiveSaveToFile ( FileStream f, int indentLevel ) : void
WriteIndents ( FileStream f, int indentLevel ) : void
WriteString ( FileStream f, string str, bool quote ) : void

메소드 상세

AsBoolean() 공개 메소드

Attempts to convert and return the value of this instance as a boolean. If the conversion is invalid, the default value is returned.
public AsBoolean ( bool defaultValue ) : bool
defaultValue bool The default value to return if the conversion is invalid.
리턴 bool

AsFloat() 공개 메소드

Attempts to convert and return the value of this instance as a float. If the conversion is invalid, the default value is returned.
public AsFloat ( float defaultValue ) : float
defaultValue float The default value to return if the conversion is invalid.
리턴 float

AsInteger() 공개 메소드

Attempts to convert and return the value of this instance as an integer. If the conversion is invalid, the default value is returned.
public AsInteger ( int defaultValue ) : int
defaultValue int The default value to return if the conversion is invalid.
리턴 int

AsLong() 공개 메소드

Attempts to convert and return the value of this instance as a long. If the conversion is invalid, the default value is returned.
public AsLong ( long defaultValue ) : long
defaultValue long The default value to return if the conversion is invalid.
리턴 long

AsString() 공개 메소드

Returns the value of this instance as a string.
public AsString ( ) : string
리턴 string

KeyValue() 공개 메소드

Initializes a new instance of the KeyValue class.
public KeyValue ( string name, string value ) : System
name string The optional name of the root key.
value string The optional value assigned to the root key
리턴 System

LoadAsBinary() 공개 정적인 메소드

Attempts to load the given filename as a binary KeyValue.
This method will swallow any exceptions that occur when reading, use ReadAsBinary if you wish to handle exceptions.
public static LoadAsBinary ( string path ) : KeyValue
path string The path to the file to load.
리턴 KeyValue

LoadAsText() 공개 정적인 메소드

Attempts to load the given filename as a text KeyValue.
This method will swallow any exceptions that occur when reading, use ReadAsText if you wish to handle exceptions.
public static LoadAsText ( string path ) : KeyValue
path string The path to the file to load.
리턴 KeyValue

LoadFromString() 공개 정적인 메소드

Attempts to create an instance of KeyValue from the given input text.
This method will swallow any exceptions that occur when reading, use ReadAsText if you wish to handle exceptions.
public static LoadFromString ( string input ) : KeyValue
input string The input text to load.
리턴 KeyValue

ReadAsBinary() 공개 메소드

Populate this instance from the given Stream as a binary KeyValue.
public ReadAsBinary ( Stream input ) : bool
input Stream The input to read from.
리턴 bool

ReadAsText() 공개 메소드

Populate this instance from the given Stream as a text KeyValue.
public ReadAsText ( Stream input ) : bool
input Stream The input to read from.
리턴 bool

ReadFileAsText() 공개 메소드

Opens and reads the given filename as text.
public ReadFileAsText ( string filename ) : bool
filename string The file to open and read.
리턴 bool

SaveToFile() 공개 메소드

Saves this instance to file.
public SaveToFile ( string path, bool asBinary ) : void
path string The file path to save to.
asBinary bool If set to true, saves this instance as binary.
리턴 void

ToString() 공개 메소드

Returns a System.String that represents this instance.
public ToString ( ) : string
리턴 string

this() 공개 메소드

Gets the child KeyValue with the specified key. If no child with this key exists, Invalid is returned.
public this ( string key ) : KeyValue
key string
리턴 KeyValue

프로퍼티 상세

Invalid 공개적으로 정적으로 프로퍼티

Represents an invalid KeyValue given when a searched for child does not exist.
public static KeyValue,Nexus.Client.Games.Steam Invalid
리턴 KeyValue