C# Класс ByteReader, TheUnseen

MemoryStream.ReadLine has an interesting oddity: it doesn't always advance the stream's position by the correct amount: http://social.msdn.microsoft.com/Forums/en-AU/Vsexpressvcs/thread/b8f7837b-e396-494e-88e1-30547fcf385f Solution? Custom line reader with the added benefit of not having to use streams at all.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ByteReader ( TextAsset asset ) : UnityEngine
ByteReader ( byte bytes ) : UnityEngine
ReadCSV ( ) : BetterList

Read a single line of Comma-Separated Values from the file.

ReadDictionary ( ) : string>.Dictionary

Assume that the entire file is a collection of key/value pairs.

ReadLine ( ) : string

Read a single line from the buffer.

Приватные методы

Метод Описание
ReadLine ( byte buffer, int start, int count ) : string

Read a single line from the buffer.

Описание методов

ByteReader() публичный Метод

public ByteReader ( TextAsset asset ) : UnityEngine
asset UnityEngine.TextAsset
Результат UnityEngine

ByteReader() публичный Метод

public ByteReader ( byte bytes ) : UnityEngine
bytes byte
Результат UnityEngine

ReadCSV() публичный Метод

Read a single line of Comma-Separated Values from the file.
public ReadCSV ( ) : BetterList
Результат BetterList

ReadDictionary() публичный Метод

Assume that the entire file is a collection of key/value pairs.
public ReadDictionary ( ) : string>.Dictionary
Результат string>.Dictionary

ReadLine() публичный Метод

Read a single line from the buffer.
public ReadLine ( ) : string
Результат string