Compartilhar via


GraphLinkCollection.Remove Method

Definition

Overloads

Remove(GraphLink)

Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection.

Remove(IEnumerable<GraphLink>)

Remove all the links in the given set.

Remove(GraphLink, GraphLink)

Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection.

Remove(GraphNodeId, GraphNodeId, GraphCategory)

Removes the given category from the link between source and target and if this is the last category, then it removes the link as well.

Remove(String, String, GraphCategory)

Removes the given category from the link between source and target and if this is the last category, then it removes the link as well.

Remove(GraphLink)

Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection.

public:
 virtual bool Remove(Microsoft::VisualStudio::GraphModel::GraphLink ^ item);
public bool Remove (Microsoft.VisualStudio.GraphModel.GraphLink item);
abstract member Remove : Microsoft.VisualStudio.GraphModel.GraphLink -> bool
override this.Remove : Microsoft.VisualStudio.GraphModel.GraphLink -> bool
Public Function Remove (item As GraphLink) As Boolean

Parameters

item
GraphLink

The Link to remove from the System.Collections.Generic.ICollection.

Returns

True if item was successfully removed from the System.Collections.Generic.ICollection; otherwise, false. This method also returns false if item is not found in the original System.Collections.Generic.ICollection.

Implements

Applies to

Remove(IEnumerable<GraphLink>)

Remove all the links in the given set.

public:
 void Remove(System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::GraphModel::GraphLink ^> ^ links);
public void Remove (System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.GraphModel.GraphLink> links);
member this.Remove : seq<Microsoft.VisualStudio.GraphModel.GraphLink> -> unit
Public Sub Remove (links As IEnumerable(Of GraphLink))

Parameters

links
IEnumerable<GraphLink>

The set of links to remove. This argument can be the result of a Get method.

Applies to

Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection.

public:
 bool Remove(Microsoft::VisualStudio::GraphModel::GraphLink ^ link, [Runtime::InteropServices::Out] Microsoft::VisualStudio::GraphModel::GraphLink ^ % resultLink);
public bool Remove (Microsoft.VisualStudio.GraphModel.GraphLink link, out Microsoft.VisualStudio.GraphModel.GraphLink resultLink);
member this.Remove : Microsoft.VisualStudio.GraphModel.GraphLink * GraphLink -> bool
Public Function Remove (link As GraphLink, ByRef resultLink As GraphLink) As Boolean

Parameters

link
GraphLink

The Link to remove from the System.Collections.Generic.ICollection.

resultLink
GraphLink

The item that was removed from the System.Collections.Generic.ICollection.

Returns

True if item was successfully removed from the System.Collections.Generic.ICollection; otherwise, false. This method also returns false if item is not found in the original System.Collections.Generic.ICollection.

Applies to

Remove(GraphNodeId, GraphNodeId, GraphCategory)

Removes the given category from the link between source and target and if this is the last category, then it removes the link as well.

public:
 Microsoft::VisualStudio::GraphModel::GraphLink ^ Remove(Microsoft::VisualStudio::GraphModel::GraphNodeId ^ sourceId, Microsoft::VisualStudio::GraphModel::GraphNodeId ^ targetId, Microsoft::VisualStudio::GraphModel::GraphCategory ^ category);
public Microsoft.VisualStudio.GraphModel.GraphLink Remove (Microsoft.VisualStudio.GraphModel.GraphNodeId sourceId, Microsoft.VisualStudio.GraphModel.GraphNodeId targetId, Microsoft.VisualStudio.GraphModel.GraphCategory category);
member this.Remove : Microsoft.VisualStudio.GraphModel.GraphNodeId * Microsoft.VisualStudio.GraphModel.GraphNodeId * Microsoft.VisualStudio.GraphModel.GraphCategory -> Microsoft.VisualStudio.GraphModel.GraphLink
Public Function Remove (sourceId As GraphNodeId, targetId As GraphNodeId, category As GraphCategory) As GraphLink

Parameters

sourceId
GraphNodeId

The source node

targetId
GraphNodeId

The target node

category
GraphCategory

An initial category to add to the link

Returns

The Link that was removed or null if the link still has other categories

Applies to

Remove(String, String, GraphCategory)

Removes the given category from the link between source and target and if this is the last category, then it removes the link as well.

public:
 Microsoft::VisualStudio::GraphModel::GraphLink ^ Remove(System::String ^ sourceId, System::String ^ targetId, Microsoft::VisualStudio::GraphModel::GraphCategory ^ category);
public Microsoft.VisualStudio.GraphModel.GraphLink Remove (string sourceId, string targetId, Microsoft.VisualStudio.GraphModel.GraphCategory category);
member this.Remove : string * string * Microsoft.VisualStudio.GraphModel.GraphCategory -> Microsoft.VisualStudio.GraphModel.GraphLink
Public Function Remove (sourceId As String, targetId As String, category As GraphCategory) As GraphLink

Parameters

sourceId
String

The source node

targetId
String

The target node

category
GraphCategory

An initial category to add to the link

Returns

The Link that was removed or null if the link still has other categories

Applies to