Beispiel #1
0
        public static void Read(this IDictionary <string, ushort> _this, EndianReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                string key   = reader.ReadString();
                ushort value = reader.ReadUInt16();
                _this.Add(key, value);
            }
        }
Beispiel #2
0
        public static void Read(this IDictionary <long, string> _this, EndianReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                long   key   = reader.ReadInt64();
                string value = reader.ReadString();
                _this.Add(key, value);
            }
        }
Beispiel #3
0
        public static void Read(this IDictionary <string, byte> _this, EndianReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                string key   = reader.ReadString();
                byte   value = reader.ReadByte();
                _this.Add(key, value);
            }
        }
Beispiel #4
0
        public static void ReadSafe(this IDictionary <Tuple <ushort, ushort>, float> _this, EndianReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                Tuple <ushort, ushort> key = reader.ReadTupleUInt16UInt16();
                float value = reader.ReadSingle();
                _this[key] = value;
            }
        }
Beispiel #5
0
        public static void Read <T>(this IDictionary <Tuple <T, long>, string> _this, EndianReader reader, Func <int, T> converter)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                Tuple <T, long> key   = reader.ReadTupleTLong(converter);
                string          value = reader.ReadString();
                _this.Add(key, value);
            }
        }
        public static string[][] ReadStringArrayArray(this EndianReader _this)
        {
            int count = _this.ReadInt32();

            string[][] array = new string[count][];
            for (int i = 0; i < count; i++)
            {
                array[i] = _this.ReadStringArray();
            }
            return(array);
        }
Beispiel #7
0
        public static void Read(this IDictionary <Tuple <byte, byte>, float> _this, EndianReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                Tuple <byte, byte> key = reader.ReadTupleByteByte();
                float value            = reader.ReadSingle();
                _this.Add(key, value);
            }
        }
Beispiel #8
0
        public static void Read(this IDictionary <uint, string> _this, EndianReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                uint   key   = reader.ReadUInt32();
                string value = reader.ReadStringAligned();
                _this.Add(key, value);
            }
        }
Beispiel #9
0
        public static void Read(this IDictionary <string, float> _this, EndianReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                string key   = reader.ReadStringAligned();
                float  value = reader.ReadSingle();
                _this.Add(key, value);
            }
        }
        public static uint[][] ReadUInt32ArrayArray(this EndianReader _this)
        {
            int count = _this.ReadInt32();

            uint[][] array = new uint[count][];
            for (int i = 0; i < count; i++)
            {
                array[i] = _this.ReadUInt32Array();
            }
            return(array);
        }
        public static Tuple <byte, float>[] ReadTupleByteSingleArray(this EndianReader reader)
        {
            int count = reader.ReadInt32();

            Tuple <byte, float>[] array = new Tuple <byte, float> [count];
            for (int i = 0; i < count; i++)
            {
                Tuple <byte, float> tuple = ReadTupleByteSingle(reader);
                array[i] = tuple;
            }
            return(array);
        }
        public static Tuple <bool, string>[] ReadTupleBoolStringArray(this EndianReader reader)
        {
            int count = reader.ReadInt32();

            Tuple <bool, string>[] array = new Tuple <bool, string> [count];
            for (int i = 0; i < count; i++)
            {
                Tuple <bool, string> tuple = ReadTupleBoolString(reader);
                array[i] = tuple;
            }
            return(array);
        }