private void method_1(short code, object value) { switch (Class820.smethod_2((int)code)) { case Enum5.const_5: case Enum5.const_7: case Enum5.const_8: case Enum5.const_9: case Enum5.const_14: case Enum5.const_15: if (value == null || value is DxfHandledObject) { break; } throw new ArgumentException("Value should be a handled object for code " + (object)code + "."); case Enum5.const_18: if (value == null) { break; } throw new ArgumentException("Value must be null for code " + (object)code + "."); default: if (value != null) { break; } throw new ArgumentException("Value may not be null for code " + (object)code + "."); } }
public IGraphCloneable Clone(CloneContext cloneContext) { DxfXRecordValue dxfXrecordValue = new DxfXRecordValue(); dxfXrecordValue.short_0 = this.short_0; DxfHandledObject dxfHandledObject1 = this.Value as DxfHandledObject; if (dxfHandledObject1 == null) { dxfXrecordValue.Value = this.Value; } else { DxfHandledObject dxfHandledObject2 = (DxfHandledObject)dxfHandledObject1.Clone(cloneContext); dxfXrecordValue.object_0 = (object)dxfHandledObject2; switch (Class820.smethod_2((int)this.short_0)) { case Enum5.const_5: case Enum5.const_7: case Enum5.const_8: case Enum5.const_15: cloneContext.method_0(dxfHandledObject2); break; } } return((IGraphCloneable)dxfXrecordValue); }
public string GetValueString(int baseCode) { if (this.string_0 == null && this.object_0 != null) { this.string_0 = Class820.GetValueString(baseCode, this.object_0); } return(this.string_0); }
public void imethod_3(Struct18 group) { if (group.Code == 999) { return; } this.vmethod_0(group.Code); Class820.smethod_41(group.Value, this); }
public void imethod_1(int baseCode, Struct18 group) { if (group.Code == 999) { return; } this.vmethod_0(group.Code); Class820.smethod_3(baseCode, group.Value, this); }
internal Struct18[] method_0() { if (Class820.smethod_2((int)this.short_0) == Enum5.const_13) { WW.Math.Point3D object0 = (WW.Math.Point3D) this.object_0; return(new Struct18[3] { new Struct18((int)this.short_0, (object)object0.X), new Struct18((int)this.short_0 + 10, (object)object0.Y), new Struct18((int)this.short_0 + 20, (object)object0.Z) }); } return(new Struct18[1] { new Struct18((int)this.short_0, this.Value) }); }
public Struct18 imethod_2(DxfReader dxfReader) { string s = this.textReader_0.ReadLine(); if (s == null) { return(Struct18.struct18_0); } int code = int.Parse(s); ++this.long_0; string valueString = this.textReader_0.ReadLine(); object obj = Class820.TryGetValue(dxfReader, code, valueString); ++this.long_0; return(new Struct18(code, obj, valueString)); }
public static Class615 smethod_0(Interface1 A_0, Interface30 A_1, float A_2) { int num = 13; Interface3 interface2 = A_0 as Interface3; if (interface2 != null) { if (interface2.imethod_0().imethod_22()) { return(new Class617(interface2, A_1)); } return(new Class616(interface2, A_1)); } Interface2 interface4 = A_0 as Interface2; if ((A_0 is Field) && ((A_0 as Field).Type == FieldType.FieldSymbol)) { interface4 = (A_0 as Field).method_46(); } if ((interface4 != null) && !(interface4 is TextBox)) { return(new Class619(interface4, A_1)); } Interface4 interface3 = null; if (A_0 is Interface4) { interface3 = A_0 as Interface4; } else if (A_0 is TextBox) { interface3 = (A_0 as TextBox).method_78(A_1); } if (interface3 != null) { return(new Class618(interface3, A_1)); } Class820 class2 = A_0 as Class820; if (class2 == null) { throw new ArgumentException(BookmarkStart.b("稲嬴䄶堸场吼嬾慀㑂ⱄ⍆⹈⹊㥌潎═⩒╔㉖捘筚", num) + A_0.GetType()); } return(new Class618(class2, A_1)); }
public Struct18 imethod_1(DxfReader dxfReader, int baseGroupCode) { int code = this.vmethod_0(); if (code == int.MinValue) { return(Struct18.struct18_0); } ++this.int_0; try { object obj = Class820.GetValue(baseGroupCode, this); ++this.int_0; return(new Struct18(code, obj)); } catch (EndOfStreamException ex) { return(Struct18.struct18_0); } }
private void method_18(DxfReader r, Class259 objectBuilder) { this.bool_2 = true; DxfVersion version = r.ModelBuilder.Version; this.dwgVersion_0 = Class885.smethod_3(version); if (this.stream_0 == null) { this.stream_0 = (Stream) new PagedMemoryStream(1024L, 1024); } if (this.dwgVersion_0 > DwgVersion.Dwg1018 && this.stream_1 == null) { this.stream_1 = (Stream) new PagedMemoryStream(1024L, 1024); } r.method_85(); Encoding encoding = Encodings.GetEncoding((int)r.Model.Header.DrawingCodePage); Interface40 nterface40 = (Interface40) new Class725(this.stream_0, encoding, version); DxfProxyEntity.Class361 class361 = new DxfProxyEntity.Class361((Interface29) new Class990((Stream)null, nterface40, this.dwgVersion_0 > DwgVersion.Dwg1018 ? (Interface40) new Class728(this.stream_1, encoding, version) : nterface40, nterface40)); while (r.CurrentGroup.Code != 0) { switch (Class820.smethod_2(r.CurrentGroup.Code)) { case Enum5.const_8: case Enum5.const_9: case Enum5.const_14: case Enum5.const_15: ulong handle = (ulong)r.CurrentGroup.Value; DxfHandledObject dxfHandledObject = new DxfHandledObject(); dxfHandledObject.SetHandle(handle); DxfObjectReference dxfObjectReference = new DxfObjectReference((IDxfHandledObject)dxfHandledObject); Struct18 group1 = new Struct18(r.CurrentGroup.Code, (object)dxfObjectReference); class361.imethod_0(group1); r.method_85(); continue; case Enum5.const_13: int code = r.CurrentGroup.Code; WW.Math.Point3D point3D = new WW.Math.Point3D((double)r.CurrentGroup.Value, 0.0, 0.0); r.method_85(); if (r.CurrentGroup.Code == code + 10) { point3D.Y = (double)r.CurrentGroup.Value; r.method_85(); if (r.CurrentGroup.Code == code + 20) { point3D.Z = (double)r.CurrentGroup.Value; r.method_85(); } } Struct18 group2 = new Struct18(code, (object)point3D); class361.imethod_0(group2); continue; default: class361.imethod_0(r.CurrentGroup); r.method_85(); continue; } } }
public Struct18 method_0() { short num = this.method_1(); Enum5 enum5 = Class820.smethod_2((int)num); object obj; switch (enum5) { case Enum5.const_1: obj = (object)this.interface30_0.imethod_6(); break; case Enum5.const_2: obj = (object)this.interface30_0.imethod_18(); break; case Enum5.const_3: obj = (object)this.interface30_0.imethod_19((int)this.interface30_0.imethod_14()); break; case Enum5.const_4: obj = (object)this.interface30_0.imethod_8(); break; case Enum5.const_5: obj = (object)DxfHandledObject.Parse(this.interface30_1.ReadString()); break; case Enum5.const_6: obj = (object)this.interface30_1.ReadString(); break; case Enum5.const_7: throw new Exception("Object ID is not supported."); case Enum5.const_8: case Enum5.const_9: case Enum5.const_14: case Enum5.const_15: obj = (object)this.list_0[this.int_0++].ObjectReference; break; case Enum5.const_10: case Enum5.const_17: obj = (object)this.interface30_0.imethod_14(); break; case Enum5.const_11: obj = (object)this.interface30_0.imethod_11(); break; case Enum5.const_12: obj = (object)this.interface30_0.imethod_12(); break; case Enum5.const_13: obj = (object)this.interface30_0.imethod_39(); break; case Enum5.const_16: obj = (object)this.interface30_1.ReadString(); break; default: throw new Exception("Unsupported group value type " + (object)enum5 + "."); } return(new Struct18((int)num, obj)); }
public void imethod_0(Struct18 group) { this.interface29_0.imethod_32((short)group.Code); Enum5 enum5 = Class820.smethod_2(group.Code); switch (enum5) { case Enum5.const_1: this.interface29_0.imethod_14((bool)group.Value); break; case Enum5.const_2: this.interface29_0.imethod_11((byte)group.Value); break; case Enum5.const_3: byte[] bytes = (byte[])group.Value; this.interface29_0.imethod_32((short)bytes.Length); this.interface29_0.imethod_12(bytes); break; case Enum5.const_4: this.interface29_0.imethod_16((double)group.Value); break; case Enum5.const_5: this.interface29_0.imethod_37((byte)0, (ulong)group.Value); break; case Enum5.const_6: this.interface29_0.imethod_37((byte)0, DxfHandledObject.Parse((string)group.Value)); break; case Enum5.const_7: throw new Exception("Object ID is not supported."); case Enum5.const_8: this.interface29_0.imethod_41((DxfHandledObject)((DxfObjectReference)group.Value).Value); break; case Enum5.const_9: this.interface29_0.imethod_39((DxfHandledObject)((DxfObjectReference)group.Value).Value); break; case Enum5.const_10: case Enum5.const_17: this.interface29_0.imethod_32((short)group.Value); break; case Enum5.const_11: this.interface29_0.imethod_33((int)group.Value); break; case Enum5.const_12: this.interface29_0.imethod_34((long)group.Value); break; case Enum5.const_13: this.interface29_0.imethod_24((WW.Math.Point3D)group.Value); break; case Enum5.const_14: this.interface29_0.imethod_38((DxfHandledObject)((DxfObjectReference)group.Value).Value); break; case Enum5.const_15: this.interface29_0.imethod_40((DxfHandledObject)((DxfObjectReference)group.Value).Value); break; case Enum5.const_16: this.interface29_0.imethod_4((string)group.Value); break; default: throw new Exception("Unsupported group value type " + (object)enum5 + "."); } }
public void imethod_3(Struct18 group) { this.method_0(group.Code); this.textWriter_0.WriteLine(Class820.smethod_21(group.Value)); }
public override void Write(DxfWriter w) { base.Write(w); switch (this.DataType) { case Enum26.const_0: Enum5 enum5 = Class820.smethod_2(this.Data.Code); bool flag; switch (enum5) { case Enum5.const_1: flag = (bool)this.Data.Value; break; case Enum5.const_10: case Enum5.const_17: flag = this.Data.Int16 != (short)0; break; default: throw new Exception("Invalid group value type " + (object)enum5 + "."); } w.Write(291, (object)flag); break; case Enum26.const_1: w.Write(0, this.Data.Value); break; case Enum26.const_2: w.Write(281, this.Data.Value); break; case Enum26.const_3: w.Write(70, (object)this.Data.Int16); break; case Enum26.const_4: w.Write(92, this.Data.Value); break; case Enum26.const_5: w.Write(160, this.Data.Value); break; case Enum26.const_6: w.Write(282, this.Data.Value); break; case Enum26.const_7: w.Write(71, (object)this.Data.UInt16); break; case Enum26.const_8: w.Write(93, this.Data.Value); break; case Enum26.const_9: w.Write(320, this.Data.Value); break; case Enum26.const_10: w.Write(41, this.Data.Value); break; case Enum26.const_11: w.Write(40, this.Data.Value); break; case Enum26.const_12: throw new Exception(); case Enum26.const_13: case Enum26.const_14: if (this.Data.Value == null) { throw new Exception("No binary data"); } byte[] numArray1 = this.Data.Value as byte[]; if (numArray1 != null) { w.Write(94, (object)numArray1.Length); int num = numArray1.Length / (int)sbyte.MaxValue; byte[] numArray2 = new byte[(int)sbyte.MaxValue]; for (int index = 0; index < num; ++index) { Array.Copy((Array)numArray1, index * (int)sbyte.MaxValue, (Array)numArray2, 0, (int)sbyte.MaxValue); w.Write(310, (object)numArray2); } int length = numArray1.Length % (int)sbyte.MaxValue; byte[] numArray3 = new byte[length]; Array.Copy((Array)numArray1, numArray1.Length - length, (Array)numArray3, 0, length); w.Write(310, (object)numArray3); break; } Stream stream = this.Data.Value as Stream; if (stream == null) { throw new Exception("Unexpected binary data value type " + (object)this.Data.Value.GetType()); } long position = stream.Position; stream.Position = 0L; w.Write(94, (object)(int)stream.Length); int num1 = (int)stream.Length / (int)sbyte.MaxValue; byte[] buffer1 = new byte[(int)sbyte.MaxValue]; for (int index = 0; index < num1; ++index) { stream.Read(buffer1, 0, (int)sbyte.MaxValue); w.Write(310, (object)buffer1); } int count = (int)stream.Length % (int)sbyte.MaxValue; byte[] buffer2 = new byte[count]; stream.Read(buffer2, 0, count); w.Write(310, (object)buffer2); stream.Position = position; break; default: throw new Exception(); } }
public void imethod_4(Struct18 group) { this.vmethod_0(group.Code); Class820.smethod_36(group.Value, this); }