SmoCollectionBase.ClearAndInitialize 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
清除舊物件並初始化集合。 與 Refresh() 不同,集合中已列出的物件將被新版本取代。 使用此方法確保集合中所有物件都擁有你想要的完整屬性集合。
public void ClearAndInitialize(string filterQuery, System.Collections.Generic.IEnumerable<string> extraFields);
member this.ClearAndInitialize : string * seq<string> -> unit
Public Sub ClearAndInitialize (filterQuery As String, extraFields As IEnumerable(Of String))
參數
- filterQuery
- String
XPATH 透過屬性過濾物件(例如將過濾器設定為 [(@IsSystemObject = 0)] 會排除系統物件。 將參數設為空字串或空字串,結果不會被施加任何濾波器
- extraFields
- IEnumerable<String>
每個物件中要載入的欄位清單。 (例如,將 extraFields 設為「new string[] { “IsSystemVersioned” })“,在呼叫 TableCollection 這個方法時,每個資料表物件都會包含「IsSystemVersioned」屬性。 將參數設為空或空陣列,結果中只會包含預設欄位