SenseNet.ContentRepository.ContentList.CheckValidation C# (CSharp) Method

CheckValidation() private static method

private static CheckValidation ( IXPathNavigable xml ) : void
xml IXPathNavigable
return void
        private static void CheckValidation(IXPathNavigable xml)
		{
            //XmlValidator schema = LoadSchemaDocument();
            var schema = XmlValidator.LoadFromManifestResource(Assembly.GetExecutingAssembly(), ContentListDefinitionSchemaManifestResourceName);
			if (!schema.Validate(xml))
			{
				if (schema.Errors.Count == 0)
					throw new ContentRegistrationException(SR.Exceptions.Registration.Msg_InvalidContentListDefinitionXml);
				else
					throw new ContentRegistrationException(String.Concat(
						SR.Exceptions.Registration.Msg_InvalidContentListDefinitionXml, ": ", schema.Errors[0].Exception.Message),
						schema.Errors[0].Exception);
			}
		}