Exemplo n.º 1
0
        public void Write(TngBinaryWriter writer)
        {
            writer.Write(InfoId);

            if (Id != -1)
            {
                writer.Write(Id);

                foreach (KeyValuePair <string, object> data in Data)
                {
                    writer.WriteObject(data.Value);
                }

                writer.Write(ChildEntry.Length);
                for (int i = 0; i < ChildEntry.Length; i++)
                {
                    ChildEntry[i].Write(writer);
                }
            }
            else
            {
                foreach (KeyValuePair <string, object> data in Data)
                {
                    writer.WriteObject(data.Value);
                }
            }
        }
Exemplo n.º 2
0
        public void Write(System.IO.Stream fileStream)
        {
            using (TngBinaryWriter writer = new TngBinaryWriter(EndianBitConverter.Little, fileStream))
            {
                writer.Write(magic);
                writer.Write(TngEntry.Length);
                writer.Write(infoSize);

                foreach (KeyValuePair <int, TngInfo> tngInfo in TngInfo)
                {
                    writer.WriteTerminatedString(tngInfo.Value.Name, 0x00);
                }

                for (int i = 0; i < TngEntry.Length; i++)
                {
                    TngEntry[i].Write(writer);
                }
            }
        }
Exemplo n.º 3
0
        public void Write(TngBinaryWriter writer)
        {
            writer.Write(InfoId);

            if (Id != -1)
            {
                writer.Write(Id);

                foreach (KeyValuePair<string, object> data in Data)
                {
                    writer.WriteObject(data.Value);
                }

                writer.Write(ChildEntry.Length);
                for (int i = 0; i < ChildEntry.Length; i++)
                {
                    ChildEntry[i].Write(writer);
                }
            }
            else
            {
                foreach (KeyValuePair<string, object> data in Data)
                {
                    writer.WriteObject(data.Value);
                }
            }
        }
Exemplo n.º 4
0
        public void Write(System.IO.Stream fileStream)
        {
            using (TngBinaryWriter writer = new TngBinaryWriter(EndianBitConverter.Little, fileStream))
            {
                writer.Write(magic);
                writer.Write(TngEntry.Length);
                writer.Write(infoSize);

                foreach (KeyValuePair<int, TngInfo> tngInfo in TngInfo)
                {
                    writer.WriteTerminatedString(tngInfo.Value.Name, 0x00);
                }

                for (int i = 0; i < TngEntry.Length; i++)
                {
                    TngEntry[i].Write(writer);
                }
            }
        }