Share via


IAttachedCollectionService.GetOrCreateCollectionSource(Object, String) 方法

定義

取得或建立 IAttachedCollectionSource 實例,代表指定專案上指定關聯性的附加集合。

public:
 Microsoft::VisualStudio::Shell::IAttachedCollectionSource ^ GetOrCreateCollectionSource(System::Object ^ item, System::String ^ relationshipName);
public:
 Microsoft::VisualStudio::Shell::IAttachedCollectionSource ^ GetOrCreateCollectionSource(Platform::Object ^ item, Platform::String ^ relationshipName);
Microsoft::VisualStudio::Shell::IAttachedCollectionSource GetOrCreateCollectionSource(winrt::Windows::Foundation::IInspectable const & item, std::wstring const & relationshipName);
public Microsoft.VisualStudio.Shell.IAttachedCollectionSource GetOrCreateCollectionSource (object item, string relationshipName);
abstract member GetOrCreateCollectionSource : obj * string -> Microsoft.VisualStudio.Shell.IAttachedCollectionSource
Public Function GetOrCreateCollectionSource (item As Object, relationshipName As String) As IAttachedCollectionSource

參數

item
Object

要從中取得附加集合的專案。

relationshipName
String

關聯性名稱,描述要取得或建立的附加集合。

傳回

代表附加集合的 IAttachedCollectionSource 實例。

備註

如需具體範例,“基底類型”所識別關聯性的 “Class” 專案,會導致建構 Items 屬性包含專案基底類型的 IAttachedCollectionSource。

適用於