private void method_16( DxfReader r, Class285 objectBuilder, ref Interface30 binaryDataReader, ref Interface30 stringDataReader, ref long graphicsDataSizeInBytes, ref PagedMemoryStream graphicsData, ref Stream currentStream) { string subclass = (string)r.CurrentGroup.Value; r.method_85(); this.stream_0 = (Stream)null; this.stream_1 = (Stream)null; while (!r.method_92(subclass)) { if (!this.method_17(r, objectBuilder, ref graphicsDataSizeInBytes, ref graphicsData, ref currentStream)) { r.method_85(); } } if (this.stream_0 != null) { this.stream_0.Position = 0L; binaryDataReader = Class444.Create(r.ModelBuilder.Version, this.stream_0); } if (this.stream_1 == null) { return; } this.stream_1.Position = 0L; stringDataReader = Class444.Create(r.ModelBuilder.Version, this.stream_1); }
internal override void Read(Class434 or, Class259 objectBuilder) { base.Read(or, objectBuilder); Interface30 objectBitStream = or.ObjectBitStream; int num1; if (or.Builder.Version > DxfVersion.Dxf14) { num1 = objectBitStream.imethod_11(); if (or.Builder.Version > DxfVersion.Dxf15) { objectBitStream.ReadString(); } int num2 = objectBitStream.imethod_11(); this.dwgVersion_0 = (DwgVersion)(num2 & (int)ushort.MaxValue); this.short_1 = (short)(num2 >> 16); this.bool_2 = objectBitStream.imethod_6(); if (this.bool_2) { objectBitStream.imethod_11(); objectBitStream.imethod_11(); } } else { num1 = objectBitStream.imethod_11(); objectBitStream.imethod_11(); } this.dxfClass_0 = or.Builder.Model.Classes.GetClassWithClassNumber((short)num1); Class1048 class1048 = (Class1048)objectBitStream; this.stream_0 = (Stream) new PagedMemoryStream(1024L, 1024); this.long_0 = (long)class1048.MainReader.imethod_21((PagedMemoryStream)this.stream_0); Class444.Create(or.Builder.Version, this.stream_0); if (class1048.StringReader != class1048.MainReader) { this.stream_1 = (Stream) new PagedMemoryStream(1024L, 1024); this.uint_0 = class1048.StringReader.imethod_21((PagedMemoryStream)this.stream_1); } else { this.method_13(or.Builder.Version); } while (class1048.HandleReader.Stream.Position < class1048.HandleReader.Stream.Length) { ReferenceType referenceType; ulong handle = class1048.HandleReader.imethod_34(0UL, true, out referenceType); DxfTypedObjectReference typedObjectReference = new DxfTypedObjectReference(referenceType); this.list_0.Add(typedObjectReference); objectBuilder.ChildBuilders.Add((Interface10)typedObjectReference.method_0(handle)); } }
private void method_20(DxfWriter w) { Interface30 binaryDataReader = Class444.Create(w.Version, this.stream_0); binaryDataReader.imethod_4(0L); Interface30 stringDataReader = (Interface30)null; if (this.stream_1 != null) { stringDataReader = Class444.Create(w.Version, this.stream_1); stringDataReader.imethod_4(0L); } DxfProxyEntity.Class362 class362 = new DxfProxyEntity.Class362(this.dwgVersion_0, this.long_0, binaryDataReader, this.uint_0, stringDataReader, this.list_0); while (!class362.IsAtEndOfStream) { Struct18 group = class362.method_0(); w.Write(group); } }
internal override void Write(Class432 ow) { base.Write(ow); Interface29 objectWriter = ow.ObjectWriter; if (ow.Version > DxfVersion.Dxf14) { objectWriter.imethod_33(this.dxfClass_0 == null ? 0 : (int)this.dxfClass_0.ClassNumber); if (ow.Version > DxfVersion.Dxf15) { objectWriter.imethod_4("cn:" + (this.dxfClass_0 == null ? string.Empty : this.dxfClass_0.CPlusPlusClassName)); } objectWriter.imethod_33((int)(this.dwgVersion_0 | (DwgVersion)((int)this.short_1 << 16))); objectWriter.imethod_14(this.bool_2); if (this.bool_2) { objectWriter.imethod_33(this.dxfClass_0 == null ? 0 : (int)this.dxfClass_0.ItemClassId); objectWriter.imethod_33(this.dxfClass_0 == null ? 0 : (int)this.dxfClass_0.ClassNumber); } } else { objectWriter.imethod_33(this.dxfClass_0 == null ? 0 : (int)this.dxfClass_0.ItemClassId); objectWriter.imethod_33(this.dxfClass_0 == null ? 0 : (int)this.dxfClass_0.ClassNumber); } Interface30 binaryDataReader = Class444.Create(ow.Version, this.stream_0); binaryDataReader.imethod_4(0L); Interface30 stringDataReader = (Interface30)null; if (this.stream_1 != null) { stringDataReader = Class444.Create(ow.Version, this.stream_1); stringDataReader.imethod_4(0L); } if (this.bool_2 && this.method_23(ow.Version)) { DxfProxyEntity.Class362 class362 = new DxfProxyEntity.Class362(this.dwgVersion_0, this.long_0, binaryDataReader, this.uint_0, stringDataReader, this.list_0); DxfProxyEntity.Class361 class361 = new DxfProxyEntity.Class361(ow.ObjectWriter); while (!class362.IsAtEndOfStream) { class361.imethod_0(class362.method_0()); } } else { this.method_14(ow.ObjectWriter, this.stream_0, this.long_0); if (ow.Version > DxfVersion.Dxf18) { if (stringDataReader != null && this.uint_0 > 0U) { this.method_14((Interface29)((Class990)ow.ObjectWriter).StringBitStreamWriter, this.stream_1, (long)this.uint_0); } } else { this.method_15(ow.ObjectWriter); } } foreach (DxfTypedObjectReference typedObjectReference in this.list_0) { objectWriter.imethod_42(typedObjectReference.ReferenceType, (DxfHandledObject)typedObjectReference.ObjectReference.Value); } }