共用方式為


IElementDirectory.FindElements<T> 方法 (Boolean)

尋找指定的型別的目錄中的所有項目。

命名空間:  Microsoft.VisualStudio.Modeling
組件:  Microsoft.VisualStudio.Modeling.Sdk.12.0 (在 Microsoft.VisualStudio.Modeling.Sdk.12.0.dll 中)

語法

'宣告
Function FindElements(Of T As ModelElement) ( _
    includeDescendants As Boolean _
) As ReadOnlyCollection(Of T)
ReadOnlyCollection<T> FindElements<T>(
    bool includeDescendants
)
where T : ModelElement

類型參數

  • T
    項目的類型。

參數

  • includeDescendants
    類型:System.Boolean
    true 表示包含衍生自所指定網域類別型別的所有網域類別的項目,否則為 false。

傳回值

類型:System.Collections.ObjectModel.ReadOnlyCollection<T>
所指定型別的唯讀集合。

備註

如果找不到,則要傳回項目。

.NET Framework 安全性

請參閱

參考

IElementDirectory 介面

FindElements 多載

Microsoft.VisualStudio.Modeling 命名空間