SenseNet.ContentRepository.Storage.XmlValidator.LoadSchema C# (CSharp) Method

LoadSchema() public method

public LoadSchema ( Stream stream ) : void
stream Stream
return void
		public void LoadSchema(Stream stream)
		{
			if (stream == null)
				throw new ArgumentNullException("stream");

			ClearErrors();
			_schema = XmlSchema.Read(stream, ValidationCallback);
		}
        public static XmlValidator LoadFromManifestResource(Assembly resourceOwner, string manifestResourceName)

Same methods

XmlValidator::LoadSchema ( string schemaXml ) : void

Usage Example

Example #1
0
 public static XmlValidator LoadFromManifestResource(Assembly resourceOwner, string manifestResourceName)
 {
     if (manifestResourceName == null)
         throw new ArgumentNullException("manifestResourceName");
     if (resourceOwner == null)
         throw new ArgumentNullException("resourceOwner");
     Stream stream = resourceOwner.GetManifestResourceStream(manifestResourceName);
     if (stream == null)
         throw new ArgumentException(String.Concat("Resource is not found. Assembly: ", resourceOwner.FullName, ", Resource name: ", manifestResourceName));
     XmlValidator schema = new XmlValidator();
     schema.LoadSchema(stream);
     return schema;
 }
All Usage Examples Of SenseNet.ContentRepository.Storage.XmlValidator::LoadSchema