GetManifestSchemaSet() публичный статический Метод

public static GetManifestSchemaSet ( string schemaNamespace ) : XmlSchemaSet
schemaNamespace string
Результат System.Xml.Schema.XmlSchemaSet
Пример #1
0
        private static void ValidateManifestSchema(XDocument document, string schemaNamespace)
        {
            XmlSchemaSet manifestSchemaSet = ManifestSchemaUtility.GetManifestSchemaSet(schemaNamespace);

            document.Validate(manifestSchemaSet, delegate(object sender, ValidationEventArgs e) {
                if (e.Severity == XmlSeverityType.Error)
                {
                    throw new InvalidOperationException(e.Message);
                }
            });
        }
Пример #2
0
        private static void ValidateManifestSchema(XDocument document, string schemaNamespace)
        {
            var schemaSet = ManifestSchemaUtility.GetManifestSchemaSet(schemaNamespace);

            document.Validate(schemaSet, (sender, e) =>
            {
                if (e.Severity == XmlSeverityType.Error)
                {
                    // Throw an exception if there is a validation error
                    throw new InvalidOperationException(e.Message);
                }
            });
        }