This topic has not yet been rated - Rate this topic

ElementOperations.CanCopyCore Method

Gets a value indicating whether the collection of ModelElements can be copied to an IDataObject.

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk (in Microsoft.VisualStudio.Modeling.Sdk.dll)
protected virtual bool CanCopyCore(
	ICollection<ModelElement> elements,
	ClosureType closureType
)

Parameters

elements
Type: System.Collections.Generic.ICollection<ModelElement>

The collection of ModelElements to copy.

closureType
Type: Microsoft.VisualStudio.Modeling.ClosureType

The type of closure to use to filter the elements.

Return Value

Type: System.Boolean
true if the collection of ModelElements can be copied to an IDataObject.

This is implemented outside of CanCopy, so that subclasses can override the public CanCopy and CanMove methods independently. If subclasses want to have the same behavior for both CanCopy and CanMove, they can just override this method. (Before this method existed, overriding only CanCopy led to the side effect of changing the CanMove behavior.) The supported formats: (1) ElementGroupPrototype, and (2) custom formats

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.