Example #1
0
        public void Add(ISchema schemaToAdd)
        {
            var schemaImplementation = schemaToAdd as Schema;

            SecResourceControl.Wait(schemaImplementation.XmlSchema.SourceUri);
            thisSchemaSet.Add(schemaImplementation.XmlSchema);
        }
Example #2
0
        private async Task LoadUriAsync(string path)
        {
            SecResourceControl.Wait(path);
            var req = WebRequest.Create(path);

            using (Stream stream = req.GetResponse().GetResponseStream())
            {
                await LoadAsync(stream);
            }
        }
Example #3
0
 public bool Read(string path)
 {
     SecResourceControl.Wait(path);
     try
     {
         var schemaReader = XmlTextReader.Create(path);
         thisSchema = XmlSchema.Read(schemaReader, null);
         return(true);
     }
     catch (XmlSchemaException)
     {
         return(false);
     }
 }
Example #4
0
 public void Load(string path)
 {
     SecResourceControl.Wait(path);
     doc = XDocument.Load(path, LoadOptions.SetBaseUri);
 }