Freigeben über


Microsoft.VisualStudio.Modeling Namespace

The Modeling namespace deals with additions, deletions, and modifications of elements and links when a model is created or modified.

The Modeling namespace classes allow your code to create and modify elements and links within transactions. The Store is the class that represents the contents (elements and links) of a model in memory. Whenever you programmatically make changes to a model, these changes must be done within a Transaction.

You can define rules that are run when certain things happen, such as an element or a link being added, changed, or deleted.

You can also subscribe to be notified when an event such as a transaction being rolled back occurs.

The difference between rules and events is that rules are fired within a transaction while events are fired after a transaction is committed.

Classes

  Class Description
Public class AddRule Represents a rule that is called when an object is added to the model.
Public class AmbiguousMonikerException The exception that is thrown when a model element to be added to the store has the same moniker as another element already in the store.
Public class AncestorVisitorFilter Use with an ElementWalker to visit all aggregating relationships.
Public class BreadthFirstRolePlayerFirstElementWalker Visits the elements in the model, applying an action to each one. The action can update or accumulate results from the elements that are visited.
Public class CalculatedPropertyValueHandler<TElement, TValue> Base class for calculated domain property handlers.
Public class ChainingElementVisitorFilter Represents a chaining filter, which adds filters to a list.
Public class ChangeRule Represents a rule that is called when the value of a property of an element is changed.
Public class ClosureContextHelper Provides methods to add and retrieve closure context information to and from a particular element walker context.
Public class ClosureElementOperation Represents closure element operations.
Public class ClosureFindAndRelateElementOperation Represents a closure operation to mark a find or create target element operation.
Public class ClosureFindAndRelateOrDeleteCopiedElementOperation Represents a closure operation to find and relate to an element or delete the copied element if the target is not found.
Public class ClosureFindElementOperation Represents a closure operation that marks a find target element operation.
Public class ClosureFindOrCreateAndRelateElementOperation Represents a closure operation that marks a find or create target element operation.
Public class ClosureFindOrCreateElementOperation Represents a closure operation that marks a find or create target element operation.
Public class Context Contains the mapping of transactions to partitions.
Public class CopyClosureFilter Base class for copy closure visitor filter
Public class CopyOriginContext Provides information about the origin of the ElementGroupPrototype.
Public class CoreCopyClosure Copy closure visitor filter
Public class CoreCopyClosureBase Base class for copy closure visitor filter
Public class CoreDeleteClosure Remove closure visitor filter
Public class CoreDeleteClosureBase Base class for remove closure visitor filter
Public class CoreDomainModel Represents the domain model that defines the basic elements used by all domain models.
Public class CoreDomainModelSerializationBehavior A DomainXmlSerializationBehavior implementation for defined behavior CoreDomainModelSerializationBehavior.
Public class DefaultVisitorFilter Visits all aggregate relationships.
Public class DeleteRule Represents a rule that is called when an object is deleted from the model. Executes after the corresponding DeletingRule.
Public class DeletingRule Represents a rule that is called when an element is about to be deleted in the model.
Public class DependsOnDomainModelAttribute Attribute class used to specify the domain model the current domain model extends.
Public class DepthFirstElementAndLinkWalker Visits the elements in the model, applying an action to each one. Links can be included.
Public class DepthFirstElementWalker Enables depth-first traversals of the model starting from a particular element or group of elements. Provides notification of begin and end traversing an element and its descendants.
Public class DeserializationEndingEventArgs Provides data for the DeserializationEnding event and notifies listeners that deserialization has ended.
Public class DomainClassInfo Represents a domain class.
Public class DomainClassXmlSerializer Represents the base class for all generated domain serializers.
Public class DomainDataDirectory Stores metadata about the domain models in the store.
Public class DomainDataNotFoundException This exception is thrown by the DomainDataDirectory class when a domain element that has a specific identity is not found in the directory.
Public class DomainModel Represents a domain model. This is the base class of the domain model of your DSL.
Protected class DomainModel.DomainMemberInfo Stores information about a domain property in a domain model.
Protected class DomainModel.DomainRolePlayerInfo Stores information that is used by the domain model reflector to locate a domain role.
Public class DomainModelExtensionProvider Defines the MEF contract for a type that provides a mapping between a domain model extension and the domain model it extends
Public class DomainModelInfo Represents a domain model definition.
Public class DomainModelOwnerAttribute In the code generated from a domain type, indicates the domain model in which a domain class is defined.F905
Public class DomainModelSerializerAttribute Custom attribute used to indicate that a class is a domain model serializer, and the type of domain model it serializes.
Public class DomainObjectIdAttribute Represents the ID of a domain object.
Public class DomainObjectInfo Represents an element in a domain model.
Public class DomainPropertyAttribute Indicates that the target is a domain property of a domain class.
Public class DomainPropertyInfo Represents a property of a domain class.
Public class DomainPropertyValueHandler Represents the base class for domain property value handlers.
Public class DomainPropertyValueHandler<TElement, TValue> Represents the base class for strong-type domain property handlers.
Public class DomainPropertyXmlSerializer The base class for all custom domain property serializers
Public class DomainRelationshipAttribute Indicates that the target is a domain relationship.
Public class DomainRelationshipInfo Represents the metadata about a domain relationship.
Public class DomainRelationshipXmlSerializer Represents the base class for all generated domain serializers for domain relationships.
Public class DomainRoleAttribute Indicates that the target is a domain role of a domain relationship.
Public class DomainRoleInfo Represents a role of a domain relationship.
Public class DomainXmlSerializationBehavior Represents all XML serialization behavior-generated classes.
Public class DomainXmlSerializerDirectory Combines XML serialization behaviors from different domain models together.
Public class DomainXmlSerializerDirectoryEntry Associates one domain class ID to its DomainClassXmlSerializer type.
Public class DomainXmlSerializerNamespaceEntry An tuple that links one Domain Model to its xml namepace type.
Public class DomainXmlTypeSerializerDirectoryEntry An tuple that maps a type to the serializer type to use.
Public class ElementAddedEventArgs Provides data for the ElementAdded event.
Public class ElementAddedEventManager Manages element added events.
Public class ElementClosureWalker Represents a walker that builds closures on model elements.
Public class ElementDeletedEventArgs Provides data for the ElementDeleted event.
Public class ElementDeletedEventManager Manages element removed events.
Public class ElementDeletingEventArgs Provides data for the ElementDeleting event.
Public class ElementDeserializedRule A rule that fires when new ModelElements are created, used by SimpleMonikerResolver to monitor new elements.
Public class ElementEventArgs Provides data for notifications associated with a model element.
Public class ElementEventManager In derived classes, provides a mechanism for observers to register for and be notified of changes to an element within the scope of the store.
Public class ElementEventsBegunEventArgs Provides data for the ElementEventsBegun event.
Public class ElementEventsBegunEventManager Manages events that have begun for elements.
Public class ElementEventsEndedEventArgs Provides data for the ElementEventsEnded event.
Public class ElementEventsEndedEventManager Manages element events ended events.
Public class ElementFactory Represents a factory of domain model objects.
Public class ElementGroup Provides a way to collect elements and element links.
Public class ElementGroupContext Stores context information about an element group.
Public class ElementGroupPrototype Contains the information necessary to recreate a set of elements and links. Used to store elements in tools, on the clipboard, and in a drag operation.
Public class ElementLink Base class for all domain relationships.
Public class ElementMovedEventArgs Provides data for the ElementMoved event.
Public class ElementMovedEventManager Manages element moved events.
Public class ElementNameAttribute Indicates the target domain property provides the element name property.
Public class ElementNameProvider Represents a name provider for domain elements.
Public class ElementOperations Provides common operations that act upon a collection of model elements.
Public class ElementPropertyChangedEventArgs Provides data for the ElementPropertyChanged event.
Public class ElementPropertyChangedEventManager Manages element property changed events.
Public class ElementWalker Enables various traversals of the model starting from a particular element.
Public class EmbeddingVisitorFilter Visits all embedding relationships.
Public class EventManagerDirectory Enables you to add or remove custom code to run when an event is raised.
Public class ExistingElementEventManager In a derived class, manages element events.
Public class ExtendsDomainModelAttribute Obsolete. Indicates the domain model that this domain model extends.
Public class ExtensionElement Base class for all domain model element extensions. Allows a DSL Definition to be extended by a third party.
Public class ExtensionElementSerializer Serializer ExtensionElementSerializer for DomainClass ExtensionElement.
Public class ExtensionExtendsElement DomainRelationship ExtensionExtendsElement Reference relationship between ElementExtension and ModelElement
Public class ExtensionExtendsElementSerializer Serializer ExtensionExtendsElementSerializer for DomainClass ExtensionExtendsElement.
Public class GenericEventArgs Abstract base class for all event arguments for element events.
Public class GlobalEventManager When overridden in a derived class, enables observers to register for and be notified of changes within a store.
Public class InternalModelingErrorException Represents the exception that is thrown when an internal error occurs inside the modeling engine.
Public class InvalidDomainModelException Represents an exception that is thrown when an error is encountered with the metadata assigned to a domain model.
Public class ISerializerLocatorExtensions Provides convenience methods to extend the standard ISerializerLocator interface
Public class LinkedElementCollection<T> Provides a collection of all elements that are linked to an element.
Public class MefMetadataConstants Defines the string constants for the names of domain model MEF metadata keys
Public class MergeAbortedException Represents an exception that is thrown when a merge operation on a domain model is aborted by the user.
Public class MergeContext Provides merge information initially set by the merge process when the objects of a ElementGroupPrototype are reconstituted into the target store.
Public class MergeElementGroupEventArgs Provides data for the MergeElementGroup event.
Public class ModelElement The base class for all domain model elements. All elements and links in a DomainModel are members of this type.
Public class ModelingEventArgs Provides data for modeling events.
Public class ModelingException Represents the base class for several exceptions thrown by the modeling engine.
Public class Moniker Contains an expression used to map to its element.
Public class MonikerKey Represents the key of a Moniker.
Public class MoveRule Represents a rule that is called when an object is moved in the model.
Public class Partition Provides a logical container for elements in a store.
Public class PartitionDictionary Represents a collection of partitions.
Public class PropagateDeleteVisitorFilter Visits all PropagateRemove relationships.
Public class PropertyAssignment Represents a property assignment pair that consists of property ID and a property value.
Public class ProtoElement Represents the prototype class for an element.
Public class ProtoElementBase Represents the prototype for the element.
Public class ProtoGroup Contains the information to re-create an ElementGroup in the context of any store.
Public class ProtoLink Contains the information needed to recreate an ElementLink in any store.
Public class ProtoPropertyValue Contains the information necessary to populate an attribute value for a particular model element.
Public class ProtoRolePlayer Contains the data necessary to set the role player data on an ElementLink.
Public class ProvidesExtensionToDomainModelAttribute Custom attribute used to indicate that a domain model is an extension of another domain model.
Public class ReadOnlyLinkedElementCollection<T> Represents a strongly-typed read-only collection of element instances on the opposite side of a relationship.
Public class RedoStackFlushedEventArgs Event args for the RedoStackFlushed event.
Public class RoleAssignment Provides information to initialize a role that is assigned to a link element.
Public class RolePlayerChangedEventArgs Provides data for the RolePlayerChanged event.
Public class RolePlayerChangedEventManager Manages events that are changed by the role.
Public class RolePlayerChangeRule Represents a rule that is called when a role player in the model changes.
Public class RolePlayerOrderChangedEventArgs Provides data for the RolePlayerOrderChanged event.
Public class RolePlayerOrderChangedEventManager Manages events that are changed when the order of the model elements that are assigned to roles change.
Public class RolePlayerPositionChangeRule Represents a rule that is called when a model element that is assigned to a specific role changes position in a multiple relationship.
Public class RootElementSettings Similar to System.Xml.XmlWriterSettings, this class stores settings that need to be passed to a serializer when serializing a root element. Root element has additional information like schema target namespace, versions, etc., so additional information may be needed.
Public class Rule Abstract class from which different types of store rule can be derived.
Public class RuleManager Controls whether rules are enabled or disabled.
Public class RuleOnAttribute Signifies that the class to which this attribute is applied is a rule. The attribute’s parameter specifies what domain class applies to.
Public class SerializationContext Defines the context of a serialization operation.
Public class SerializationContextTransactionExtensions Extension methods for accessing SerializationContext in the scope of a Transaction
Public class SerializationException Throws a SerializationResult as an exception.
Public class SerializationMessage Represents a serialization message.
Public class SerializationResult Represents a serialization result.
Public class SerializationUtilities Provides utilities for serialization.
Public class SimpleMonikerResolver Resolves simple string references when the model is serialized using the default XML serialization.
Public class StandardExtensionLocator Standard implementation of the IExtensionLocator interface
Public class StandardSerializerLocator Standard implementation of the ISerializerLocator interface
Public class Store The store contains an in-memory representation of the elements and links in one or more models.
Public class Transaction A transaction makes sure that changes that were made to the store are treated as a group that can be committed or rolled back.
Public class TransactionBeginningEventArgs Provides data for the TransactionBeginning event.
Public class TransactionBeginningEventManager Manages transaction beginning events.
Public class TransactionBeginningRule Represents a rule that is called when a transaction is beginning in the model.
Public class TransactionCommitEventArgs Provides data for the TransactionCommit event.
Public class TransactionCommittedEventManager Manages transaction committed events.
Public class TransactionCommittingRule Represents a rule that is called when a transaction is in progress in the model.
Public class TransactionContext Stores user data in a transaction.
Public class TransactionEventArgs Provides data for transaction events.
Public class TransactionEventManager Represents the base class for managing notifications of transaction events.
Public class TransactionItem Represents a transaction item.
Public class TransactionLog Represents a container of transaction events.
Public class TransactionManager Creates Transaction objects and keeps track of the current active transaction.
Public class TransactionRollbackEventArgs Event arguments for rollback-transaction events
Public class TransactionRolledBackEventManager Manages transaction rollback events.
Public class TransactionRollingBackRule Represents a rule that is called when a transaction is being rolled back in the model.
Public class UndoItemEventArgs Provides data for the UndoItem event.
Public class UndoManager Provides the functionality for undo and redo operations.
Public class UndoRedoCanceledException Represents the exception that is thrown when an undo or redo operation has been canceled.
Public class VisitorFilters Returns various standard visitor filters.

Structures

  Structure Description
Public structure ReadOnlyLinkedElementCollection<T>.Enumerator Provides an enumerator over a ReadOnlyLinkedElementCollection

Interfaces

  Interface Description
Public interface IDomainModelSerializer Defines the contract for a standard domain model serializer.
Public interface IElementDirectory Directory of model elements that are contained within a store or a partition.
Public interface IElementPartitionMapper Interface for service used to map elements partitions when reconstituting ElementGroupPrototypes
Public interface IElementVisitor Defines the traversal of a model.
Public interface IElementVisitorFilter Provides a callback mechanism for filtering out which role players and which relationships should be visited during traversal by an ElementWalker.
Public interface IExtensionLocator This interface provides a way for the generated serializers to resolve a schema target namespace to a domain model.
Public interface IMergeElements Allows classes in derived models to access the merge functionality on a model element.
Public interface IMonikerResolver Resolves a moniker to its element.
Public interface ISchemaResolver This interface provides a way for the generated serializers to resolve a schema target namespace. Given an XML file using a particular target namespace, it is important to find the schemas that define the namespace, so the generated serializers can do schema validations properly.
Public interface ISerializerLocator This interface provides a way to locate serializers for a domain model.
Public interface ITransientTransactionContextObject Interface marker to indicate that a particular object is transient and will be released (and disposed) on transaction commit
Public interface SElementPartitionMapper Service identifier for the element group rehydration partition mapping service

Delegates

  Delegate Description
Public delegate CanCommitCallback Represents a callback method for determining whether a transaction can commit based on external criteria.
Public delegate CanUndoRedoCallback Add an instance to the UndoManager to vote on whether an undo or redo operation can continue.

Enumerations

  Enumeration Description
Public enumeration CanCommitResult Enumeration status for the CanCommit callback.
Public enumeration ChangeSource Indicates the source of a change that was made during a transaction.
Public enumeration ClosureType Describes the type of closure to create.
Public enumeration CompletionStatus Describes how the transaction was completed.
Public enumeration DeleteState Identifies the state of the element being deleted.
Public enumeration DomainPropertyKind Specifies the type of domain property.
Public enumeration DomainRoleOrder Specifies the direction of a domain role in a domain relationship.
Public enumeration Multiplicity Indicates the multiplicity for a domain role.
Public enumeration PropagatesCopyOption Enum that lists the various PropagateCopy options.
Public enumeration SerializationMessageKind Formats the serialization message.
Public enumeration TimeToFire Determines when to call the rule.
Public enumeration UndoState Describes the undo state in the UndoManager.
Public enumeration VisitorFilterResult Indicates whether an element should be visited.