private void AddNonThreadSafe(string ns, XmlSchemaCollectionNode?node) { if (_collection[ns] != null) { _collection.Remove(ns); } _collection.Add(ns, node); }
public XmlSchema?this[string?ns] { get { XmlSchemaCollectionNode?node = (XmlSchemaCollectionNode?)_collection[(ns != null) ? ns : string.Empty]; return((node != null) ? node.Schema : null); } }
/// <summary> /// Looks up the schema by its associated namespace URI /// </summary> public XmlSchema?this[string?ns] { get { XmlSchemaCollectionNode?node = (XmlSchemaCollectionNode?)_collection[ns ?? string.Empty]; return(node?.Schema); } }
private void Add(string ns, XmlSchemaCollectionNode?node) { if (_isThreadSafe) { lock (_wLock !) { AddNonThreadSafe(ns, node); } } else { AddNonThreadSafe(ns, node); } }
internal SchemaInfo?GetSchemaInfo(string?ns) { XmlSchemaCollectionNode?node = (XmlSchemaCollectionNode?)_collection[(ns != null) ? ns : string.Empty]; return((node != null) ? node.SchemaInfo : null); }
internal SchemaInfo?GetSchemaInfo(string?ns) { XmlSchemaCollectionNode?node = (XmlSchemaCollectionNode?)_collection[ns ?? string.Empty]; return(node?.SchemaInfo); }