// Token: 0x06000A7A RID: 2682 RVA: 0x00028ED0 File Offset: 0x000270D0
        internal static SafeXmlDocument GetManifest(SafeXmlDocument xmlDoc)
        {
            if (ExtensionDataHelper.xmlSchemaSet.Count == 0)
            {
                ExtensionDataHelper.xmlSchemaSet = new XmlSchemaSet();
                foreach (string text in SchemaConstants.SchemaNamespaceUriToFile.Keys)
                {
                    string schemaUri = Path.Combine(ExchangeSetupContext.InstallPath, "bin", SchemaConstants.SchemaNamespaceUriToFile[text]);
                    ExtensionDataHelper.xmlSchemaSet.Add(text, schemaUri);
                }
            }
            xmlDoc.Schemas = ExtensionDataHelper.xmlSchemaSet;
            xmlDoc.Validate(new ValidationEventHandler(ExtensionDataHelper.InvalidManifestEventHandler));
            string uri;
            string text2;

            if (!ExtensionDataHelper.TryGetOfficeAppSchemaInfo(xmlDoc, "http://schemas.microsoft.com/office/appforoffice/", out uri, out text2))
            {
                throw new OwaExtensionOperationException(Strings.ErrorInvalidManifestData(Strings.ErrorReasonManifestSchemaUnknown));
            }
            XmlNamespaceManager xmlNamespaceManager = new XmlNamespaceManager(xmlDoc.NameTable);

            xmlNamespaceManager.AddNamespace("owe", uri);
            SafeXmlDocument safeXmlDocument = null;
            string          xpath           = "//owe:OfficeApp";
            XmlNode         xmlNode         = xmlDoc.SelectSingleNode(xpath, xmlNamespaceManager);

            if (xmlNode != null)
            {
                safeXmlDocument = new SafeXmlDocument();
                safeXmlDocument.PreserveWhitespace = true;
                safeXmlDocument.LoadXml(xmlNode.OuterXml);
            }
            return(safeXmlDocument);
        }
        // Token: 0x06000A7C RID: 2684 RVA: 0x0002904C File Offset: 0x0002724C
        internal static SchemaParser GetSchemaParser(SafeXmlDocument xmlDoc, ExtensionInstallScope scope)
        {
            string text;
            string schemaVersion;

            if (!ExtensionDataHelper.TryGetOfficeAppSchemaInfo(xmlDoc, "http://schemas.microsoft.com/office/appforoffice/", out text, out schemaVersion))
            {
                throw new OwaExtensionOperationException(Strings.ErrorReasonManifestSchemaUnknown);
            }
            string a;

            if ((a = text) != null)
            {
                if (a == "http://schemas.microsoft.com/office/appforoffice/1.0")
                {
                    return(new SchemaParser1_0(xmlDoc, scope));
                }
                if (a == "http://schemas.microsoft.com/office/appforoffice/1.1")
                {
                    return(new SchemaParser1_1(xmlDoc, scope));
                }
            }
            throw new OwaExtensionOperationException(Strings.ErrorReasonManifestVersionNotSupported(schemaVersion, ExchangeSetupContext.InstalledVersion));
        }