// Token: 0x06000DDE RID: 3550 RVA: 0x0003A340 File Offset: 0x00038540 public static OABManifest LoadFromMailbox(string fileSetId, MailboxSession session) { OABManifest.Tracer.TraceFunction(0L, "OABManifest.LoadFromMailbox: start"); OABManifest result = null; MailboxFileStore mailboxFileStore = new MailboxFileStore("OAB"); FileSetItem current = mailboxFileStore.GetCurrent(fileSetId, session); using (Stream singleFile = mailboxFileStore.GetSingleFile(current, "oab.xml", session)) { if (singleFile != null) { try { result = OABManifest.Deserialize(singleFile); goto IL_6B; } catch (InvalidDataException arg) { OABManifest.Tracer.TraceError <string, InvalidDataException>(0L, "OABManifest.LoadFromMailbox: unable to load OAB manifest from mailbox fileset {0} due to exception: {1}", fileSetId, arg); goto IL_6B; } } OABManifest.Tracer.TraceError <string>(0L, "OABManifest.LoadFromMailbox: unable to load OAB manifest from mailbox fileset {0} because the manifest attachment cannot be found", fileSetId); IL_6B :; } OABManifest.Tracer.TraceFunction(0L, "OABManifest.LoadFromMailbox: end"); return(result); }
// Token: 0x06000DDF RID: 3551 RVA: 0x0003A3F4 File Offset: 0x000385F4 public static OABManifest Deserialize(Stream stream) { XmlReaderSettings settings = new XmlReaderSettings { CheckCharacters = false, ConformanceLevel = ConformanceLevel.Document, IgnoreComments = true, IgnoreWhitespace = true, IgnoreProcessingInstructions = true, CloseInput = false }; OABManifest result; using (XmlReader xmlReader = XmlReader.Create(stream, settings)) { result = OABManifest.Deserialize(stream, xmlReader); } return(result); }
// Token: 0x06000DDD RID: 3549 RVA: 0x0003A250 File Offset: 0x00038450 public static OABManifest LoadFromFile(string manifestFilePath) { OABManifest.Tracer.TraceFunction(0L, "OABManifest.LoadFromFile: start"); OABManifest oabmanifest = null; TimeSpan timeout = TimeSpan.FromMilliseconds(100.0); try { bool flag = false; int num = 0; while (!flag && num < 3) { try { using (FileStream fileStream = new FileStream(manifestFilePath, FileMode.Open, FileAccess.Read, FileShare.Read)) { oabmanifest = OABManifest.Deserialize(fileStream); OABManifest.Tracer.TraceDebug <string, OABManifest>(0L, "OABManifest.LoadFromFile: loaded OAB manifest from file {0}:\n\r{1}", manifestFilePath, oabmanifest); flag = true; } } catch (IOException arg) { OABManifest.Tracer.TraceError <string, IOException>(0L, "OABManifest.LoadFromFile: IOException opening file {0}: {1}", manifestFilePath, arg); } if (!flag) { Thread.Sleep(timeout); } num++; } } catch (InvalidDataException arg2) { OABManifest.Tracer.TraceError <string, InvalidDataException>(0L, "OABManifest.LoadFromFile: unable to load OAB manifest {0} due to exception: {1}", manifestFilePath, arg2); } OABManifest.Tracer.TraceFunction(0L, "OABManifest.LoadFromFile: end"); return(oabmanifest); }