public void Add(ISchema schemaToAdd) { var schemaImplementation = schemaToAdd as Schema; SecResourceControl.Wait(schemaImplementation.XmlSchema.SourceUri); thisSchemaSet.Add(schemaImplementation.XmlSchema); }
private async Task LoadUriAsync(string path) { SecResourceControl.Wait(path); var req = WebRequest.Create(path); using (Stream stream = req.GetResponse().GetResponseStream()) { await LoadAsync(stream); } }
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); } }
public void Load(string path) { SecResourceControl.Wait(path); doc = XDocument.Load(path, LoadOptions.SetBaseUri); }