public void Write(Class741 dataStore, Class889 w) { this.class889_0 = w; this.class741_0 = dataStore; Class49.Class55 class55 = new Class49.Class55(); class55.Schemas.AddRange((IEnumerable <Class48>)dataStore.Schemas); class55.UnknownProperties.AddRange((IEnumerable <Class558>)dataStore.SchemaUnknownProperties); this.list_0.Add(class55); this.class50_0.Schemas.AddRange((IEnumerable <Class46>)dataStore.SchemaSearchDataList); long position1 = w.Position; for (int index = 0; index < 128; ++index) { w.vmethod_1((byte)0); } this.method_8(new Class49.Class51.Class57()); this.method_8(new Class49.Class51.Class57()); this.method_9(w); this.method_11(w); this.method_12(w); this.method_13(w); this.method_14(w); this.method_15(w); this.class916_0.FileSize = (int)(w.Position - position1); long position2 = w.Position; w.Position = position1; this.class916_0.Write(w); }
internal override void vmethod_0(Class741.Class742 serializer) { Class889 stream = serializer.Stream; this.list_0.Clear(); foreach (Class48 schema in serializer.DataStore.Schemas) { this.list_0.Add(schema.Name); } stream.vmethod_11((uint)this.list_1.Count); stream.vmethod_11(0U); foreach (Class49.Class53.Class62 class62 in this.list_1) { class62.Write(stream); } stream.vmethod_13(717068L); stream.vmethod_11((uint)this.list_2.Count); stream.vmethod_11(0U); foreach (Class49.Class53.Class63 class63 in this.list_2) { class63.Write(stream); } uint num = Class49.smethod_0((uint)((ulong)stream.Position - this.ulong_0), 16); for (int index = 0; (long)index < (long)num; ++index) { stream.vmethod_1((byte)115); } this.SystemDataOffset = (ulong)stream.Position; stream.vmethod_11((uint)this.list_0.Count); foreach (string str in this.list_0) { stream.vmethod_20(str); } }
internal void Write(Class741.Class742 serializer) { Class889 stream = serializer.Stream; this.ulong_0 = (ulong)stream.Stream.Position; this.class681_0.Write(serializer); this.vmethod_0(serializer); uint n = (uint)((ulong)stream.Stream.Position - this.ulong_0); uint num = Class49.smethod_0(n, 128); this.class681_0.SegmentSize = n + num; for (int index = 0; (long)index < (long)num; ++index) { stream.vmethod_1((byte)112); } long position = stream.Stream.Position; stream.Position = (long)this.ulong_0; this.class681_0.Write(serializer); stream.Position = position; }
internal override void vmethod_0(Class741.Class742 serializer) { Class889 stream = serializer.Stream; long position1 = stream.Position; int num1 = (this.list_0.Count * 20 + 16) / 16; for (int index1 = 0; index1 < num1; ++index1) { for (int index2 = 0; index2 < 16; ++index2) { stream.vmethod_1((byte)98); } } this.DataOffset = (ulong)stream.Position; for (int index = 0; index < this.list_0.Count; ++index) { uint num2 = (uint)((ulong)stream.Position - this.DataOffset); Class49.Class52.Class60 class60 = this.list_0[index]; if (class60.ReferencedObject == null) { throw new Exception("Entry's ReferencedObject property is null."); } class60.ReferencedObject.Write(stream); class60.LocalOffset = num2; } long position2 = stream.Position; stream.Position = position1; for (int index = 0; index < this.list_0.Count; ++index) { serializer.DataIndex.Entries.Add(new Class49.Class54.Class64() { SegmentIndex = this.class681_0.SegmentIndex, LocalOffset = (uint)(stream.Position - position1) }); this.list_0[index].Write(stream); } stream.Position = position2; }
internal void Write(Class741.Class742 serializer) { Class889 stream = serializer.Stream; stream.vmethod_7(this.ushort_0); if (this.byte_0 == null || this.byte_0.Length != 6) { throw new Exception("Name must be 6 bytes long."); } stream.vmethod_2(this.byte_0, 0, this.byte_0.Length); stream.vmethod_11(this.uint_0); stream.vmethod_9(this.int_1); stream.vmethod_11(this.uint_1); stream.vmethod_9(this.int_2); stream.vmethod_9(this.int_3); stream.vmethod_9(this.int_4); stream.vmethod_9(this.int_5); stream.vmethod_9(this.int_6); for (int index = 0; index < 8; ++index) { stream.vmethod_1((byte)85); } }
internal override void vmethod_0(Class741.Class742 serializer) { Class889 stream = serializer.Stream; long position = stream.Position; uint num1 = serializer.SchemaIndex.PropertyEntries.Count == 0 ? 1U : serializer.SchemaIndex.PropertyEntries[serializer.SchemaIndex.PropertyEntries.Count - 1].Index + 1U; foreach (Class558 class558 in this.list_1) { uint num2 = (uint)(stream.Position - position); serializer.SchemaIndex.PropertyEntries.Add(new Class49.Class53.Class63() { Index = num1, SegmentIndex = this.class681_0.SegmentIndex, LocalOffset = num2 }); class558.Write(stream); ++num1; } List <string> stringList = new List <string>(); Dictionary <string, uint> dictionary = new Dictionary <string, uint>(); foreach (Class48 class48 in this.list_0) { foreach (Class986 property in class48.Properties) { uint count; if (!dictionary.TryGetValue(property.Name, out count)) { count = (uint)stringList.Count; stringList.Add(property.Name); dictionary.Add(property.Name, count); } property.NameIndex = count; } } if (serializer.SchemaIndex.SchemaEntries.Count != 0) { throw new Exception("SchemaIndex.SchemaEntries is expected to have 0 elements."); } uint num3 = 0; foreach (Class48 class48 in this.list_0) { uint num2 = (uint)(stream.Position - position); serializer.SchemaIndex.SchemaEntries.Add(new Class49.Class53.Class62() { Index = num3, SegmentIndex = this.class681_0.SegmentIndex, LocalOffset = num2 }); class48.Write(stream); ++num3; } uint num4 = Class49.smethod_0((uint)(stream.Position - position), 16); for (int index = 0; (long)index < (long)num4; ++index) { stream.vmethod_1((byte)115); } this.SystemDataOffset = (ulong)stream.Position; stream.vmethod_11((uint)stringList.Count); foreach (string str in stringList) { stream.vmethod_20(str); } }