本文整理汇总了C#中System.Xml.Schema.XmlSchema.GetExternalSchemasList方法的典型用法代码示例。如果您正苦于以下问题:C# XmlSchema.GetExternalSchemasList方法的具体用法?C# XmlSchema.GetExternalSchemasList怎么用?C# XmlSchema.GetExternalSchemasList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.Schema.XmlSchema
的用法示例。
在下文中一共展示了XmlSchema.GetExternalSchemasList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveSchemaFromCaches
//Private Methods
private void RemoveSchemaFromCaches(XmlSchema schema) {
//Remove From ChameleonSchemas and schemaLocations cache
List<XmlSchema> reprocessList = new List<XmlSchema>();
schema.GetExternalSchemasList(reprocessList, schema);
foreach(XmlSchema reprocessSchema in reprocessList) { //Remove schema from schemaLocations & chameleonSchemas tables
if (reprocessSchema.BaseUri != null && reprocessSchema.BaseUri.OriginalString.Length != 0) {
schemaLocations.Remove(reprocessSchema.BaseUri);
}
//Remove from chameleon table
ICollection chameleonKeys = chameleonSchemas.Keys;
ArrayList removalList = new ArrayList();
foreach(ChameleonKey cKey in chameleonKeys) {
if (cKey.chameleonLocation.Equals(reprocessSchema.BaseUri)) {
removalList.Add(cKey);
}
}
foreach(ChameleonKey cKey in removalList) {
chameleonSchemas.Remove(cKey);
}
}
}
示例2: RemoveSchemaFromCaches
private void RemoveSchemaFromCaches(XmlSchema schema)
{
List<XmlSchema> extList = new List<XmlSchema>();
schema.GetExternalSchemasList(extList, schema);
for (int i = 0; i < extList.Count; i++)
{
if ((extList[i].BaseUri != null) && (extList[i].BaseUri.OriginalString.Length != 0))
{
this.schemaLocations.Remove(extList[i].BaseUri);
}
ICollection keys = this.chameleonSchemas.Keys;
ArrayList list2 = new ArrayList();
foreach (ChameleonKey key in keys)
{
if (key.chameleonLocation.Equals(extList[i].BaseUri) && ((key.originalSchema == null) || object.ReferenceEquals(key.originalSchema, extList[i])))
{
list2.Add(key);
}
}
for (int j = 0; j < list2.Count; j++)
{
this.chameleonSchemas.Remove(list2[j]);
}
}
}