次の方法で共有


ElementGroup Class

Provides a way to collect elements and element links.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.ElementGroup

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)

Syntax

'宣言
Public Class ElementGroup
public class ElementGroup
public ref class ElementGroup
type ElementGroup =  class end
public class ElementGroup

The ElementGroup type exposes the following members.

Constructors

  Name Description
Public method ElementGroup(ModelElement) Convenience constructor for constructing a single element group, a common operation
Public method ElementGroup(Partition) Constructor
Public method ElementGroup(Store) Constructor

Top

Properties

  Name Description
Public property ElementIds Get a list of the Id's of the elements contained in this group
Public property ElementLinkIds Get a list of the Id's of the element links contained in this group
Public property ElementLinks Get the set of element links contained by this group. This does not include the element links contained by child subgroups.
Public property Id The Id of the group
Public property ModelElements Get a list of all the elements contained by this element group and all child element groups
Public property Partition The Partition the group was created for.
Public property RootElementIds Get a list of the Ids of the element links contained in this group
Public property RootElements The distinguished element of the group (e.g. the root of a tree, head of a list, etc.)
Public property SourceContext Returns this ElementGroup's source ElementGroup context object
Public property TargetContext Returns this ElementGroup's target ElementGroup context object
Public property UserData The user defined serializable data object

Top

Methods

  Name Description
Public method Add(ModelElement) Adds an element to the group. Any links to elements already in the group will also be added.
Public method Add(ModelElement, Boolean) Adds an element to the group.
Public method AddGraph(ModelElement) Add an element and its children to the group Any links to elements already in the group will also be added.
Public method AddGraph(ModelElement, Boolean) Add an element and its children to the group
Public method AddGraph(ModelElement, Boolean, Boolean) Add an element and its children to the group
Public method AddRange(IEnumerable<ModelElement>) Adds a collection of model elements to the group. Any links to elements already in the group will also be added.
Public method AddRange(IEnumerable<ModelElement>, Boolean) Adds a collection of model elements to the group.
Public method CreatePrototype Create a prototype for this element group
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetElements() Get the set of elements contained by this group. This does not include the set of elements contained by child subgroups.
Public method GetElements(Guid) Get the set of element instances of a particular domain class that are contained in this group. This does not include the set of elements contained by child subgroups.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method MarkAsRoot Marks an element in the group as a root element.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Fields

  Name Description
Public fieldStatic member ElementGroupIdDictionary Key used in the TargetContext ElementGroupContext for the Element Id dictionary.

Top

Remarks

ElementGroup is intended to facilitate serialization of groups of elements from one store to another.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Modeling Namespace