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

返回 IAttachedCollectionSource

注解

对于具体示例,由 "基类型" 标识的关系的 "Class" 类型的项将导致构造 IAttachedCollectionSource,其 Items 属性包含项的基类型。

适用于