// Token: 0x060018C7 RID: 6343 RVA: 0x00043434 File Offset: 0x00041634 public Enum23 method_4(string filename, out Struct43 actualFileHash, out long actualFileSize) { actualFileSize = 0L; actualFileHash = default(Struct43); Enum23 result; try { if (File.Exists(filename)) { actualFileHash = Class513.smethod_0(filename); if (this.ExpectedSize == (actualFileSize = Class234.smethod_11(filename))) { if (Struct43.smethod_5(this.ExpectedHash, actualFileHash)) { result = Enum23.const_2; } else { result = Enum23.const_1; } } else { result = Enum23.const_1; } } else { result = Enum23.const_0; } } finally { this.ForceRecheck = false; } return(result); }
// Token: 0x060018C8 RID: 6344 RVA: 0x000434B8 File Offset: 0x000416B8 public Enum23 method_5(Class186 lastFile, string filename, out Struct43 actualFileHash) { actualFileHash = default(Struct43); Enum23 result; try { if (File.Exists(filename)) { if (!this.ForceRecheck && !lastFile.ForceRecheck && !(this.Version != lastFile.Version)) { if (this.ExpectedSize == Class234.smethod_11(filename)) { return(Enum23.const_2); } } actualFileHash = Class513.smethod_0(filename); if (Struct43.smethod_5(this.ExpectedHash, actualFileHash)) { result = Enum23.const_2; } else { result = Enum23.const_1; } } else { result = Enum23.const_0; } } finally { this.ForceRecheck = false; } return(result); }
// Token: 0x06001EE9 RID: 7913 RVA: 0x000659CC File Offset: 0x00063BCC public void method_8(Class96 data, HashSet <string> filesUpdated, string installPath) { lock (((ICollection)this.FILES).SyncRoot) { lock (filesUpdated) { if (data == null) { using (HashSet <string> .Enumerator enumerator = filesUpdated.GetEnumerator()) { while (enumerator.MoveNext()) { string str = enumerator.Current; string text = str + ".mf"; string text2 = Path.Combine(installPath, text); Class186 @class = new Class186(Class234.smethod_11(text2), Class513.smethod_0(text2), null); if (this.FILES.ContainsKey(text)) { @class.Version = this.FILES[text].Version; this.FILES[text] = @class; } else { this.FILES.Add(text, @class); } } goto IL_20D; } } lock (((ICollection)data.FILES).SyncRoot) { foreach (string str2 in filesUpdated) { string text3 = str2 + ".mf"; string text4 = Path.Combine(installPath, text3); Class186 value = new Class186(Class234.smethod_11(text4), Class513.smethod_0(text4), data.FILES[text3].Version); if (this.FILES.ContainsKey(text3)) { this.FILES[text3] = value; } else { this.FILES.Add(text3, value); } } foreach (KeyValuePair <string, Class186> keyValuePair in data.FILES) { if (!this.FILES.ContainsKey(keyValuePair.Key)) { this.FILES.Add(keyValuePair.Key, keyValuePair.Value.method_0()); } else { this.FILES[keyValuePair.Key].Version = keyValuePair.Value.Version; } } } IL_20D :; } } }
// Token: 0x06002B3A RID: 11066 RVA: 0x000A7A20 File Offset: 0x000A5C20 private static void smethod_1(EventHandler <EventArgs9> progressChanged, string installPath, Class136 mf, Class337 index, int total, ref int count) { foreach (KeyValuePair <string, Class337.Struct34> keyValuePair in index) { string text = Path.Combine(installPath, keyValuePair.Key); if (!File.Exists(text) || Class234.smethod_11(text) != keyValuePair.Value.ExpectedSize || Struct43.smethod_6(Class513.smethod_0(text), keyValuePair.Value.ExpectedHash)) { if (mf.method_6(keyValuePair.Key)) { Class338 @class = mf[keyValuePair.Key]; mf.method_15(@class); @class.smethod_0(text); @class.Data = null; Class110.Instance.CreatedFileArchive.method_4(text); } count++; if (progressChanged != null) { progressChanged(null, new EventArgs9((long)count, (long)total)); } } } }
// Token: 0x060028F6 RID: 10486 RVA: 0x0009AB60 File Offset: 0x00098D60 private Class143.Class144 method_6(string filePath) { string fileName = Path.GetFileName(filePath); if (this.dictionary_0.ContainsKey(fileName)) { long num; DateTime d; Class234.smethod_13(filePath, out num, out d); Class143.Class144 @class = this.dictionary_0[fileName]; if (@class.long_0 == num && @class.class140_0.DateCreated == d) { return(@class); } @class.Dispose(); this.dictionary_0.Remove(fileName); this.int_0++; } Class143.Class144 class2 = null; Class143.Class144 result; try { class2 = new Class143.Class144(); class2.struct43_0 = Class513.smethod_0(filePath); DateTime dateCreated; Class234.smethod_13(filePath, out class2.long_0, out dateCreated); class2.class140_0 = new Class140(fileName, filePath, dateCreated); using (MemoryStream memoryStream = new MemoryStream()) { using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream)) { using (Bitmap bitmap = (Bitmap)Image.FromFile(filePath)) { binaryWriter.Write(fileName); binaryWriter.smethod_25(class2.struct43_0); binaryWriter.Write(class2.long_0); binaryWriter.Write(class2.class140_0.DateCreated.ToBinary()); using (MemoryStream memoryStream2 = new MemoryStream()) { Class157.smethod_9(bitmap, memoryStream2, 100, this.ThumbnailSize.Width, this.ThumbnailSize.Height); binaryWriter.Write(memoryStream2.Length); class2.long_1 = memoryStream2.Length; memoryStream2.Seek(0L, SeekOrigin.Begin); memoryStream2.CopyTo(memoryStream); } this.stream_0.Seek(0L, SeekOrigin.End); memoryStream.Seek(0L, SeekOrigin.Begin); memoryStream.CopyTo(this.stream_0); } } } this.stream_0.Seek(-class2.long_1, SeekOrigin.Current); class2.stream3_0 = new Stream3(this.stream_0, this.stream_0.Position, this.stream_0.Position + class2.long_1); this.dictionary_0.Add(fileName, class2); this.stream_0.Seek((long)(Class143.byte_0.Length + 4), SeekOrigin.Begin); using (Stream3 stream = new Stream3(this.stream_0)) { using (BinaryWriter binaryWriter2 = new BinaryWriter(stream)) { binaryWriter2.Write(this.dictionary_0.Count); } } result = class2; } catch (Exception ex) { if (class2 != null) { class2.Dispose(); } ex.smethod_1(new object[] { filePath }); result = null; } return(result); }
internal Template(Class513 A_0) { this.class513_0 = A_0; }