Freigeben über


IAttachedCollectionService.GetOrCreateCollectionSource Method

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

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.Immutable.12.0 (in Microsoft.VisualStudio.Shell.Immutable.12.0.dll)

Syntax

'Declaration
Function GetOrCreateCollectionSource ( _
    item As Object, _
    relationshipName As String _
) As IAttachedCollectionSource
IAttachedCollectionSource GetOrCreateCollectionSource(
    Object item,
    string relationshipName
)
IAttachedCollectionSource^ GetOrCreateCollectionSource(
    Object^ item, 
    String^ relationshipName
)
abstract GetOrCreateCollectionSource : 
        item:Object * 
        relationshipName:string -> IAttachedCollectionSource
function GetOrCreateCollectionSource(
    item : Object, 
    relationshipName : String
) : IAttachedCollectionSource

Parameters

  • item
    Type: Object

    The item.

  • relationshipName
    Type: String

    The name of the relationship.

Return Value

Type: Microsoft.VisualStudio.Shell.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.

.NET Framework Security

See Also

Reference

IAttachedCollectionService Interface

Microsoft.VisualStudio.Shell Namespace