Partager via


IAttachedCollectionSourceProvider.CreateCollectionSource Method

For a given object and relationship, create an IAttachedCollectionSource. This attached collection should contain items for the given relationship as they relate to the source item.

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

Syntax

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

Parameters

  • item
    Type: Object

    The source item for which the collection should be created.

  • relationshipName
    Type: String

    The name of the relationship for which a collection should be created.

Return Value

Type: Microsoft.VisualStudio.Shell.IAttachedCollectionSource
Returns a new IAttachedCollectionSource, or nulla null reference (Nothing in Visual Basic) if this provider does not support the creation of collections for this object.

.NET Framework Security

See Also

Reference

IAttachedCollectionSourceProvider Interface

Microsoft.VisualStudio.Shell Namespace