C# 클래스 Depressurizer.VdfFileNode

파일 보기 프로젝트 열기: Theo47/depressurizer 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
NodeData Object
NodeType System.ValueType

공개 메소드들

메소드 설명
CleanTree ( ) : void

Removes any array nodes without any value-type children

ContainsKey ( string key ) : bool

Checks whether the given key exists within an array-type node

GetNodeAt ( string args, bool create = true, int index ) : VdfFileNode

Gets the node at the given address. May be used to build structure.

LoadFromBinary ( BinaryReader stream, long streamLength = -1 ) : VdfFileNode

Loads a FileNode from stream.

LoadFromText ( StreamReader stream, bool useFirstAsRoot = false ) : VdfFileNode

Loads a FileNode from stream.

MakeArray ( ) : void
ReadBin_SeekTo ( BinaryReader stream, byte str, long fileLength ) : void
RemoveSubnode ( string key ) : bool

Removes the subnode with the given key. Can only be called on array nodes.

SaveAsBinary ( BinaryWriter stream, string actualKey = null ) : void

Writes this FileNode and childs to a stream

SaveAsText ( StreamWriter stream, int indent ) : void

Writes this FileNode to a stream

VdfFileNode ( ) : System

Creates a new array-type node

VdfFileNode ( int value ) : System

Creates a new integer-type node

VdfFileNode ( string value ) : System

Creates a new string-type node

VdfFileNode ( ulong value ) : System

Creates a new UInt64-type node

this ( string key ) : VdfFileNode

Gets or sets the subnode with the given key. Can only be used with an array node. If the subnode does not exist, creates it as an array type.

보호된 메소드들

메소드 설명
IsEmpty ( ) : bool

Checks whether or not this node has any children

비공개 메소드들

메소드 설명
ReadBin_GetStringToken ( BinaryReader reader, long streamLength = -1 ) : string

Reads from the specified stream until it reaches a string terminator (double quote with no escaping slash). The opening double quote should already be read, and the last one will be discarded.

ReadText_GetStringToken ( StreamReader stream ) : string

Reads a from the specified stream until it reaches a string terminator (double quote with no escaping slash). The opening double quote should already be read, and the last one will be discarded.

ReadText_SkipWhitespace ( StreamReader stream ) : void

Advances a stream until the next character is not whitespace

WriteBin_WriteArrayKey ( BinaryWriter writer, string arrayKey ) : void

Writes a array key to a stream, adding start/end bytes.

WriteBin_WriteEndByte ( BinaryWriter writer ) : void

Write an end byte to stream

WriteBin_WriteIntegerValue ( BinaryWriter writer, string key, int val ) : void
WriteBin_WriteStringValue ( BinaryWriter writer, string key, string val ) : void

Writes a pair o key and value to a stream, adding star/end and separator bytes

WriteText_WriteFormattedString ( StreamWriter stream, string s ) : void

Writes a string to a stream, adding start/end quotes and escaping any quotes within the string.

WriteText_WriteWhitespace ( StreamWriter stream, int indent ) : void

Writes the given number of tab characters to a stream

메소드 상세

CleanTree() 공개 메소드

Removes any array nodes without any value-type children
public CleanTree ( ) : void
리턴 void

ContainsKey() 공개 메소드

Checks whether the given key exists within an array-type node
public ContainsKey ( string key ) : bool
key string The key to look for
리턴 bool

GetNodeAt() 공개 메소드

Gets the node at the given address. May be used to build structure.
public GetNodeAt ( string args, bool create = true, int index ) : VdfFileNode
args string An ordered list of keys, like a path
create bool If true, will create any nodes it does not find along the path.
index int Start index of the arg array
리턴 VdfFileNode

IsEmpty() 보호된 메소드

Checks whether or not this node has any children
protected IsEmpty ( ) : bool
리턴 bool

LoadFromBinary() 공개 정적인 메소드

Loads a FileNode from stream.
public static LoadFromBinary ( BinaryReader stream, long streamLength = -1 ) : VdfFileNode
stream System.IO.BinaryReader Stream to load from
streamLength long
리턴 VdfFileNode

LoadFromText() 공개 정적인 메소드

Loads a FileNode from stream.
public static LoadFromText ( StreamReader stream, bool useFirstAsRoot = false ) : VdfFileNode
stream System.IO.StreamReader Stream to load from
useFirstAsRoot bool
리턴 VdfFileNode

MakeArray() 공개 메소드

public MakeArray ( ) : void
리턴 void

ReadBin_SeekTo() 공개 정적인 메소드

public static ReadBin_SeekTo ( BinaryReader stream, byte str, long fileLength ) : void
stream System.IO.BinaryReader
str byte
fileLength long
리턴 void

RemoveSubnode() 공개 메소드

Removes the subnode with the given key. Can only be called on array nodes.
public RemoveSubnode ( string key ) : bool
key string Key of the subnode to remove
리턴 bool

SaveAsBinary() 공개 메소드

Writes this FileNode and childs to a stream
public SaveAsBinary ( BinaryWriter stream, string actualKey = null ) : void
stream System.IO.BinaryWriter Stream to write to
actualKey string Name of node to write.
리턴 void

SaveAsText() 공개 메소드

Writes this FileNode to a stream
public SaveAsText ( StreamWriter stream, int indent ) : void
stream System.IO.StreamWriter Stream to write to
indent int Indentation level of each line.
리턴 void

VdfFileNode() 공개 메소드

Creates a new array-type node
public VdfFileNode ( ) : System
리턴 System

VdfFileNode() 공개 메소드

Creates a new integer-type node
public VdfFileNode ( int value ) : System
value int Value of the integer
리턴 System

VdfFileNode() 공개 메소드

Creates a new string-type node
public VdfFileNode ( string value ) : System
value string Value of the string
리턴 System

VdfFileNode() 공개 메소드

Creates a new UInt64-type node
public VdfFileNode ( ulong value ) : System
value ulong Value of the unsigned 64-bit integer
리턴 System

this() 공개 메소드

Gets or sets the subnode with the given key. Can only be used with an array node. If the subnode does not exist, creates it as an array type.
Thrown if used on a value node.
public this ( string key ) : VdfFileNode
key string Key to look for or set
리턴 VdfFileNode

프로퍼티 상세

NodeData 공개적으로 프로퍼티

public Object NodeData
리턴 Object

NodeType 공개적으로 프로퍼티

public ValueType,System NodeType
리턴 System.ValueType