ElementOperations.CanCopyCore Method

Definition

Gets a value indicating whether 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.)

protected:
 virtual bool CanCopyCore(System::Collections::Generic::ICollection<Microsoft::VisualStudio::Modeling::ModelElement ^> ^ elements, Microsoft::VisualStudio::Modeling::ClosureType closureType);
protected virtual bool CanCopyCore (System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> elements, Microsoft.VisualStudio.Modeling.ClosureType closureType);
abstract member CanCopyCore : System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> * Microsoft.VisualStudio.Modeling.ClosureType -> bool
override this.CanCopyCore : System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> * Microsoft.VisualStudio.Modeling.ClosureType -> bool
Protected Overridable Function CanCopyCore (elements As ICollection(Of ModelElement), closureType As ClosureType) As Boolean

Parameters

elements
ICollection<ModelElement>

The collection of ModelElements to copy.

closureType
ClosureType

The type of closure to use to filter the elements.

Returns

true if the collection of ModelElements can be copied to an IDataObject.

Remarks

The supported formats: (1) ElementGroupPrototype, and (2) custom formats

Applies to