示例#1
0
        public void UpdateSizes()
        {
            uint num = 0u;

            checked
            {
                try
                {
                    List <BinFileValue> .Enumerator enumerator = this.Values.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        BinFileValue current = enumerator.Current;
                        num += current.UpdateSizes();
                    }
                }
                finally
                {
                }
                this.Length = (uint)(unchecked ((ulong)num) + 4uL + 2uL);
            }
        }
示例#2
0
 public object UpdateSizes()
 {
     checked
     {
         object result;
         if (this.ListType == BinFileValueType.SameTypeValuesList1)
         {
             uint num = 0u;
             try
             {
                 List <BinFileValue> .Enumerator enumerator = this.Entries.GetEnumerator();
                 while (enumerator.MoveNext())
                 {
                     BinFileValue current = enumerator.Current;
                     num += current.UpdateSizes();
                 }
             }
             finally
             {
             }
             this.EntriesSize = (uint)(unchecked ((ulong)num) + 4uL);
             result           = (long)(9uL + unchecked ((ulong)num));
         }
         else if (this.ListType == BinFileValueType.SameTypeValuesList2)
         {
             uint num2 = 0u;
             try
             {
                 List <BinFileValue> .Enumerator enumerator2 = this.Entries.GetEnumerator();
                 while (enumerator2.MoveNext())
                 {
                     BinFileValue current2 = enumerator2.Current;
                     num2 += current2.UpdateSizes();
                 }
             }
             finally
             {
             }
             result = (long)(2uL + unchecked ((ulong)num2));
         }
         else if (this.ListType == BinFileValueType.ValuesList)
         {
             uint num3 = 0u;
             try
             {
                 List <BinFileValue> .Enumerator enumerator3 = this.Entries.GetEnumerator();
                 while (enumerator3.MoveNext())
                 {
                     BinFileValue current3 = enumerator3.Current;
                     num3 += current3.UpdateSizes();
                 }
             }
             finally
             {
             }
             if (unchecked ((ulong)this.EntriesSize) != unchecked ((ulong)num3) + 2uL)
             {
                 num3 = num3;
             }
             this.EntriesSize = (uint)(unchecked ((ulong)num3) + 2uL);
             result           = (long)(10uL + unchecked ((ulong)num3));
         }
         else if (this.ListType == BinFileValueType.ValuesList2)
         {
             uint num4 = 0u;
             try
             {
                 List <BinFileValue> .Enumerator enumerator4 = this.Entries.GetEnumerator();
                 while (enumerator4.MoveNext())
                 {
                     BinFileValue current4 = enumerator4.Current;
                     num4 += current4.UpdateSizes();
                 }
             }
             finally
             {
             }
             this.EntriesSize = (uint)(unchecked ((ulong)num4) + 2uL);
             result           = (long)(10uL + unchecked ((ulong)num4));
         }
         else if (this.ListType == BinFileValueType.DoubleTypesValuesList)
         {
             uint num5 = 0u;
             try
             {
                 List <BinFileValue> .Enumerator enumerator5 = this.Entries.GetEnumerator();
                 while (enumerator5.MoveNext())
                 {
                     BinFileValue current5 = enumerator5.Current;
                     num5 += current5.UpdateSizes();
                 }
             }
             finally
             {
             }
             this.EntriesSize = (uint)(unchecked ((ulong)num5) + 4uL);
             result           = (long)(10uL + unchecked ((ulong)num5));
         }
         else
         {
             result = 0;
         }
         return(result);
     }
 }