Beispiel #1
0
 public virtual int imethod_12(string[] values, int[] indexes)
 {
     if (!this.method_2())
     {
         Class951.Enum41 enum41 = (Class951.Enum41) this.memoryStream_0.ReadByte();
         if (Class951.Enum41.const_18 == enum41)
         {
             this.method_0();
         }
         else if (Class951.Enum41.const_21 == enum41)
         {
             int num = Class1045.smethod_7((Stream)this.memoryStream_0);
             if (indexes != null)
             {
                 for (int index = indexes.Length - 1; index >= 0; --index)
                 {
                     if (num == indexes[index])
                     {
                         return(num);
                     }
                 }
             }
             else if (num >= 0 && num < values.Length)
             {
                 return(num);
             }
         }
     }
     if (!this.method_2())
     {
         throw new Exception0("Enum value broken");
     }
     return(this.interface8_0.imethod_12(values, indexes));
 }
Beispiel #2
0
        public virtual string imethod_14()
        {
            Class951.Enum41 enum41 = (Class951.Enum41) this.memoryStream_0.ReadByte();
            if (Class951.Enum41.const_13 != enum41 && Class951.Enum41.const_14 != enum41)
            {
                throw new Exception0("Broken ReadKeyword!");
            }
            StringBuilder stringBuilder = new StringBuilder((int)byte.MaxValue);
            byte          num1          = (byte)this.memoryStream_0.ReadByte();

            byte[] numArray1 = new byte[(int)num1];
            this.memoryStream_0.Read(numArray1, 0, (int)num1);
            stringBuilder.Append(Encodings.Ascii.GetString(numArray1, 0, numArray1.Length));
            while (enum41 == Class951.Enum41.const_14)
            {
                long position = this.memoryStream_0.Position;
                enum41 = (Class951.Enum41) this.memoryStream_0.ReadByte();
                byte   num2      = (byte)this.memoryStream_0.ReadByte();
                byte[] numArray2 = new byte[(int)num2];
                this.memoryStream_0.Read(numArray2, 0, (int)num2);
                stringBuilder.Append('-');
                stringBuilder.Append(Encodings.Ascii.GetString(numArray2, 0, numArray2.Length));
            }
            return(stringBuilder.ToString());
        }
Beispiel #3
0
 public virtual void imethod_9()
 {
     try
     {
         if (!this.method_2())
         {
             Class951.Enum41 enum41 = (Class951.Enum41) this.memoryStream_0.ReadByte();
             if (Class951.Enum41.const_16 != enum41)
             {
                 if (Class951.Enum41.const_18 != enum41)
                 {
                     throw new Exception0("Broken subtype end marker");
                 }
                 this.method_0();
             }
         }
         if (!this.method_2())
         {
             return;
         }
         this.interface8_0.imethod_9();
     }
     catch (FormatException ex)
     {
         throw new Exception0("Broken subtype end marker", (Exception)ex);
     }
 }
Beispiel #4
0
 public virtual double imethod_8()
 {
     try
     {
         if (!this.method_2())
         {
             Class951.Enum41 enum41 = (Class951.Enum41) this.memoryStream_0.ReadByte();
             if (Class951.Enum41.const_6 == enum41)
             {
                 return(Class1045.smethod_8((Stream)this.memoryStream_0));
             }
             if (Class951.Enum41.const_18 == enum41)
             {
                 this.method_0();
             }
         }
         if (!this.method_2())
         {
             throw new Exception0("Broken double value!");
         }
         return(this.interface8_0.imethod_8());
     }
     catch (FormatException ex)
     {
         throw new Exception0("Broken double value!", (Exception)ex);
     }
 }
Beispiel #5
0
        public virtual Vector3D imethod_19()
        {
            Vector3D vector3D = new Vector3D();

            if (!this.method_2())
            {
                Class951.Enum41 enum41 = (Class951.Enum41) this.memoryStream_0.ReadByte();
                if (Class951.Enum41.const_20 == enum41)
                {
                    vector3D.X = Class1045.smethod_8((Stream)this.memoryStream_0);
                    vector3D.Y = Class1045.smethod_8((Stream)this.memoryStream_0);
                    vector3D.Z = Class1045.smethod_8((Stream)this.memoryStream_0);
                }
                else
                {
                    if (Class951.Enum41.const_18 != enum41)
                    {
                        throw new Exception0("Vector type requested");
                    }
                    this.method_0();
                }
            }
            if (this.method_2())
            {
                vector3D = this.interface8_0.imethod_19();
            }
            return(vector3D);
        }
Beispiel #6
0
        public virtual Point3D imethod_18()
        {
            Point3D point3D = new Point3D();

            if (!this.method_2())
            {
                Class951.Enum41 enum41 = (Class951.Enum41) this.memoryStream_0.ReadByte();
                if (Class951.Enum41.const_19 == enum41)
                {
                    point3D.X = Class1045.smethod_8((Stream)this.memoryStream_0);
                    point3D.Y = Class1045.smethod_8((Stream)this.memoryStream_0);
                    point3D.Z = Class1045.smethod_8((Stream)this.memoryStream_0);
                }
                else
                {
                    if (Class951.Enum41.const_18 != enum41)
                    {
                        throw new Exception0("Position type requested");
                    }
                    this.method_0();
                }
            }
            if (this.method_2())
            {
                point3D = this.interface8_0.imethod_18();
            }
            return(point3D);
        }
Beispiel #7
0
 public virtual bool imethod_16(bool silentMode)
 {
     Class951.Enum41 enum41 = (Class951.Enum41) this.memoryStream_0.ReadByte();
     if (Class951.Enum41.const_17 != enum41)
     {
         if (!silentMode)
         {
             throw new Exception0("Broken terminator!");
         }
         if (enum41 == Class951.Enum41.const_12)
         {
             Class1045.smethod_7((Stream)this.memoryStream_0);
         }
         return(false);
     }
     if (this.method_2())
     {
         this.method_1();
     }
     return(true);
 }
Beispiel #8
0
 public virtual void imethod_13(Interface39 values)
 {
     if (!this.method_2())
     {
         Class951.Enum41 enum41 = (Class951.Enum41) this.memoryStream_0.ReadByte();
         if (Class951.Enum41.const_18 == enum41)
         {
             this.method_0();
         }
         else if (Class951.Enum41.const_4 == enum41)
         {
             int num = Class1045.smethod_7((Stream)this.memoryStream_0);
             if (num != 0 || num != 1)
             {
                 throw new Exception0("Logical value broken");
             }
             values.Value = num != 0;
         }
         else if (Class951.Enum41.const_10 == enum41)
         {
             values.Value = true;
         }
         else
         {
             if (Class951.Enum41.const_11 != enum41)
             {
                 throw new Exception0("Logical value broken");
             }
             values.Value = false;
         }
     }
     if (!this.method_2())
     {
         return;
     }
     this.interface8_0.imethod_13(values);
 }
Beispiel #9
0
        public virtual void imethod_19(List <Class561> unknownData, bool comesFromSat)
        {
            if (comesFromSat)
            {
                throw new Exception0("Saving of unknown entities is not supported for SAT format.");
            }
            foreach (Class561 class561 in unknownData)
            {
                Class951.Enum41 enum410 = class561.enum41_0;
                switch (enum410)
                {
                case Class951.Enum41.const_1:
                case Class951.Enum41.const_2:
                case Class951.Enum41.const_3:
                case Class951.Enum41.const_5:
                case Class951.Enum41.const_13:
                case Class951.Enum41.const_14:
                case Class951.Enum41.const_15:
                case Class951.Enum41.const_16:
                    throw new Exception0("Writing of unknown entities isn't implemented yet");

                case Class951.Enum41.const_4:
                    this.imethod_4((int)((Class562 <long>)class561).gparam_0);
                    continue;

                case Class951.Enum41.const_6:
                    this.imethod_7(((Class562 <double>)class561).gparam_0);
                    continue;

                case Class951.Enum41.const_7:
                case Class951.Enum41.const_8:
                case Class951.Enum41.const_9:
                case Class951.Enum41.const_18:
                    this.WriteString(((Class562 <string>)class561).gparam_0);
                    continue;

                case Class951.Enum41.const_10:
                case Class951.Enum41.const_11:
                    this.memoryStream_0.WriteByte((byte)enum410);
                    continue;

                case Class951.Enum41.const_12:
                    this.imethod_5(((Class562 <int>)class561).gparam_0);
                    continue;

                case Class951.Enum41.const_17:
                    continue;

                case Class951.Enum41.const_19:
                    this.imethod_17(((Class562 <Point3D>)class561).gparam_0);
                    continue;

                case Class951.Enum41.const_20:
                    this.imethod_18(((Class562 <Vector3D>)class561).gparam_0);
                    continue;

                case Class951.Enum41.const_21:
                    this.imethod_4(((Class562 <int>)class561).gparam_0);
                    continue;

                default:
                    throw new Exception0("Saving of unknown entities is not supported for SAB format.");
                }
            }
        }
Beispiel #10
0
 public Class562(Class951.Enum41 type, T value)
     : base(type)
 {
     this.gparam_0 = value;
 }
Beispiel #11
0
 public Class561(Class951.Enum41 type)
 {
     this.enum41_0 = type;
 }