本文整理匯總了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]);
}
}
}