using System; namespace XUtliPoolLib { public struct SeqRef : ISeqRef, ISeqRef { public T this[int key] { get { return this.bufferRef[(int)this.startOffset + key]; } } public static CVSReader.ValueParse parser; public T[] bufferRef; public ushort startOffset; public SeqRef(T[] buffer) { this.bufferRef = buffer; this.startOffset = 0; } public void Read(XBinaryReader stream, DataHandler dh) { ushort num = stream.ReadUInt16(); this.bufferRef = SeqRef.parser.GetBuffer(dh); this.startOffset = num; } public override string ToString() { return string.Format("{0}={1}", this[0], this[1]); } } }