IAttachedCollectionService.GetOrCreateCollectionSource(Object, String) Method

Definition

Gets or creates an IAttachedCollectionSource instance representing 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 to get the attached collection from.

relationshipName
String

The relationship name describing which attached collection to get or create.

Returns

An IAttachedCollectionSource instance representing the attached collection.

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