當前位置: 首頁>>代碼示例>>C#>>正文


C# XmlSchema.GetExternalSchemasList方法代碼示例

本文整理匯總了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);
                }
            }
            
        }
開發者ID:gbarnett,項目名稱:shared-source-cli-2.0,代碼行數:23,代碼來源:xmlschemaset.cs

示例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]);
         }
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:25,代碼來源:XmlSchemaSet.cs


注:本文中的System.Xml.Schema.XmlSchema.GetExternalSchemasList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。