Пример #1
0
 // Token: 0x06002462 RID: 9314 RVA: 0x0007B548 File Offset: 0x00079748
 public void method_16(IEnumerable <Class338> data)
 {
     this.method_7();
     if (data == null)
     {
         throw new ArgumentNullException("data");
     }
     if (!this.bool_2)
     {
         throw new InvalidOperationException("The index has not been loaded.");
     }
     foreach (Class338 @class in data)
     {
         Class136.Class339 class2 = @class as Class136.Class339;
         if (class2 == null)
         {
             throw new ArgumentException("Item is not MultiFileDataDetails.");
         }
         if (!this.dictionary_0.ContainsValue(class2))
         {
             throw new ArgumentException("The item was not loaded from the MultiFile.");
         }
         Class136.smethod_11(this.stream_0, this.binaryReader_0, class2);
     }
 }
Пример #2
0
 // Token: 0x06002467 RID: 9319 RVA: 0x0000FC5A File Offset: 0x0000DE5A
 private static void smethod_11(Stream str, BinaryReader reader, Class136.Class339 mfd)
 {
     str.Position = (long)((ulong)mfd.uint_4);
     if (mfd.DataLength > 0U)
     {
         mfd.Data = reader.ReadBytes((int)mfd.DataLength);
         return;
     }
     mfd.Data = new byte[0];
 }
Пример #3
0
 // Token: 0x06002452 RID: 9298 RVA: 0x0007B2F0 File Offset: 0x000794F0
 public Class338 method_4(string name)
 {
     if (this.dictionary_0.ContainsKey(name))
     {
         throw new ArgumentException(string.Format("The specified key already exists: '{0}'.", name));
     }
     Class136.Class339 @class = new Class136.Class339();
     @class.LoadedFromStream = false;
     this.dictionary_0.Add(name, @class);
     return(@class);
 }
Пример #4
0
 // Token: 0x06002465 RID: 9317 RVA: 0x0007B718 File Offset: 0x00079918
 private static void smethod_9(Stream str, BinaryReader reader, out short majorVersion, out short minorVersion, out uint scale, out uint timeStamp, ref Dictionary <string, Class338> data, ref List <KeyValuePair <string, Class136.Class339> > orderedData)
 {
     byte[] array = reader.ReadBytes(Class136.byte_0.Length);
     if (!array.smethod_9(Class136.byte_0))
     {
         throw new InvalidFileType(Class136.byte_0, array);
     }
     majorVersion = reader.ReadInt16();
     minorVersion = reader.ReadInt16();
     scale        = reader.ReadUInt32();
     timeStamp    = reader.ReadUInt32();
     if (scale == 0U)
     {
         scale = 1U;
     }
     for (;;)
     {
         uint num = reader.ReadUInt32() * scale;
         if (num == 0U)
         {
             break;
         }
         Class136.Class339 @class = new Class136.Class339();
         @class.LoadedFromStream = true;
         @class.uint_5           = num;
         @class.uint_4           = reader.ReadUInt32() * scale;
         @class.DataLength       = reader.ReadUInt32();
         @class.Flags            = reader.ReadUInt16();
         if (@class.Compressed)
         {
             @class.DecompressedLength = reader.ReadUInt32();
         }
         else
         {
             @class.DecompressedLength = @class.DataLength;
         }
         @class.TimeStamp = reader.ReadUInt32();
         ushort count = reader.ReadUInt16();
         byte[] data2 = reader.ReadBytes((int)count);
         string key   = Class136.smethod_15(data2);
         data.Add(key, @class);
         if (orderedData != null)
         {
             orderedData.Add(new KeyValuePair <string, Class136.Class339>(key, @class));
         }
         str.Position = (long)((ulong)num);
     }
 }
Пример #5
0
 // Token: 0x0600243E RID: 9278 RVA: 0x0007AC18 File Offset: 0x00078E18
 public static void smethod_0(Class321 pd, BinaryWriter write_stream, uint offset_orig, uint offset_new, Stream stream_orig, Stream stream_new)
 {
     using (Stream3 stream = new Stream3(stream_orig))
     {
         using (Stream3 stream2 = new Stream3(stream_new))
         {
             using (Class136 @class = new Class136(stream))
             {
                 using (Class136 class2 = new Class136(stream2))
                 {
                     List <KeyValuePair <string, Class136.Class339> > list  = new List <KeyValuePair <string, Class136.Class339> >();
                     List <KeyValuePair <string, Class136.Class339> > list2 = null;
                     long endPosition;
                     class2.method_9(ref list, out endPosition);
                     long endPosition2;
                     @class.method_9(ref list2, out endPosition2);
                     using (Stream3 stream3 = new Stream3(stream, 0L, endPosition2))
                     {
                         using (Stream3 stream4 = new Stream3(stream2, 0L, endPosition))
                         {
                             Class292.smethod_12(pd, Enum81.const_0, write_stream, offset_orig, offset_new, stream3, stream4);
                         }
                     }
                     foreach (KeyValuePair <string, Class136.Class339> keyValuePair in list)
                     {
                         if (@class.method_6(keyValuePair.Key))
                         {
                             Class136.Class339 class3 = @class[keyValuePair.Key] as Class136.Class339;
                             Class136.smethod_1(pd, write_stream, offset_orig, offset_new, keyValuePair.Key, stream, class3.uint_4, class3.uint_4 + class3.DataLength, stream2, keyValuePair.Value.uint_4, keyValuePair.Value.uint_4 + keyValuePair.Value.DataLength);
                         }
                         else
                         {
                             class2.method_15(keyValuePair.Value);
                             Class292.smethod_4(pd, write_stream, keyValuePair.Value.DataLength, keyValuePair.Value.Data, 0U, 0U, 0U);
                         }
                     }
                 }
             }
         }
     }
 }
Пример #6
0
 // Token: 0x06002461 RID: 9313 RVA: 0x0007B4D4 File Offset: 0x000796D4
 public void method_15(Class338 data)
 {
     this.method_7();
     if (data == null)
     {
         throw new ArgumentNullException("data");
     }
     if (!this.bool_2)
     {
         throw new InvalidOperationException("The index has not been loaded.");
     }
     Class136.Class339 @class = data as Class136.Class339;
     if (@class == null)
     {
         throw new ArgumentException("data is not MultiFileDataDetails.");
     }
     if (!this.dictionary_0.ContainsValue(@class))
     {
         throw new ArgumentException("The data was not loaded from the MultiFile.");
     }
     Class136.smethod_11(this.stream_0, this.binaryReader_0, @class);
 }