IAttachedCollectionService.GetOrCreateCollectionSource(Object, String) Method

Definition

Gets or creates an IAttachedCollectionSource instance that represents an attached collection for the given relationship on the given item.

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

Parameters

item
Object

The item.

relationshipName
String

The name of the relationship.

Returns

IAttachedCollectionSource

Returns IAttachedCollectionSource.

Remarks

For a concrete example, an item of type "Class" for a relationship identified by "Base Types" would result in the construction of an IAttachedCollectionSource whose Items property contain the base types for the item.

Applies to