Compartilhar via


RolePlayerMenuCommand Class

Represents a command that can be added to the value list for a role property in the property window.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.Design.RolePlayerMenuCommand

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

Syntax

'Declaração
Public MustInherit Class RolePlayerMenuCommand
public abstract class RolePlayerMenuCommand
public ref class RolePlayerMenuCommand abstract
[<AbstractClass>]
type RolePlayerMenuCommand =  class end
public abstract class RolePlayerMenuCommand

The RolePlayerMenuCommand type exposes the following members.

Constructors

  Name Description
Protected method RolePlayerMenuCommand Initializes a new instance of the RolePlayerMenuCommand class.

Top

Properties

  Name Description
Public property MenuText When overridden in a derived class, gets the name of the command.
Public property Result Gets or sets a value that represents the result of the command.

Top

Methods

  Name Description
Public method DoCommand When overridden in a derived class, executes the command.
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 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.)
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. (Overrides Object.ToString().)

Top

Remarks

A domain relationship that has a one-to-one or zero-to-one role can generate a role property. By default, every role property for a zero-to-one role has a command to remove the current model element.

To add a command to the role property list, derive a class from this class and add an instance of the derived class to the RolePlayerMenuCommands collection of the RolePlayerPropertyDescriptor for the role property of the model element.

Notes to Inheritors

When you inherit from RolePlayerMenuCommand, you must override the following members: DoCommand and MenuText.

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.Design Namespace

RolePlayerPropertyDescriptor