Freigeben über


VsValidationContext Class

Context specific to the VS Shell. It derives from ValidationContext.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.Validation.ValidationContext
    Microsoft.VisualStudio.Modeling.Shell.VsValidationContext

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

Syntax

'Declaration
Public Class VsValidationContext _
    Inherits ValidationContext
public class VsValidationContext : ValidationContext
public ref class VsValidationContext : public ValidationContext
type VsValidationContext =  
    class 
        inherit ValidationContext 
    end
public class VsValidationContext extends ValidationContext

The VsValidationContext type exposes the following members.

Constructors

  Name Description
Public method VsValidationContext(array<String[], ModelElement, IServiceProvider) Constructor.
Public method VsValidationContext(array<String[], IEnumerable<ModelElement>, IServiceProvider) Constructor.
Public method VsValidationContext(ValidationCategories, ModelElement, IServiceProvider) Constructor.
Public method VsValidationContext(ValidationCategories, IEnumerable<ModelElement>, IServiceProvider) Constructor.
Public method VsValidationContext(array<String[], ModelElement, IServiceProvider, Type) Constructor.
Public method VsValidationContext(array<String[], IEnumerable<ModelElement>, IServiceProvider, Type) Constructor.
Public method VsValidationContext(ValidationCategories, ModelElement, IServiceProvider, Type) Constructor.
Public method VsValidationContext(ValidationCategories, IEnumerable<ModelElement>, IServiceProvider, Type) Constructor.

Top

Properties

  Name Description
Public property Categories Gets the validation categories for this validation context. (Inherited from ValidationContext.)
Public property CurrentViolations Gets the collection of validation messages for the validation context. (Inherited from ValidationContext.)
Public property CustomCategories Gets the custom validation strings for the validation context. (Inherited from ValidationContext.)
Public property ModelExplorerToolWindow Gets the model explorer tool window associated with this validation context.
Public property ServiceProvider Returns the service associated with this context.
Public property ValidationSubjects Gets the list of model elements to validate. (Inherited from ValidationContext.)

Top

Methods

  Name Description
Protected method ConstructValidationMessage Overrideable method to allow the derived class to create messages. (Overrides ValidationContext.ConstructValidationMessage(String, String, ViolationType, array<ModelElement[]).)
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 GetCache<T>() Gets the cache for the specified class. (Inherited from ValidationContext.)
Public method GetCache<T>(String) Gets the cache for the specified class. (Inherited from ValidationContext.)
Protected method GetDiagramNavigationCommands Override to supply one or more diagram navigation commands for the referenced elements.
Public method GetDiagramNavigationTargets Get the list of shapes associated with the referenced model elements, that we can target for navigation.
Protected method GetDiagramNavigationTargetSubstitutes Gets a list of zero-or-more substitute shapes for the given target.
Protected method GetExplorerNavigationCommand Returns a TaskMenuCommand capable of navigating to the appropriate node in the model explorer window for this validation message. If no corresponding node exists in the model explorer, this property returns null.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Protected method GetNavigationCommands Full list of navigation commands for this validation message. Default implementation concatentates the DiagramNavigateCommands with the ExplorerNavigateCommand.
Public method GetNavigationProxyModelElements Returns the substitutes model element for the passed in model element. Consider the case where the *viewed* presentation model element(s) (PELs) represents the model element(s) which are proxies to the actual offending model element reported during the model validation. (Overrides ValidationContext.GetNavigationProxyModelElements(ModelElement).)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method LogError Creates a validation error and logs a message into the collection that the validation context maintains. (Inherited from ValidationContext.)
Public method LogFatal Creates a fatal error for validation and logs a message in the validation context. (Inherited from ValidationContext.)
Public method LogMessage Creates a validation information message and logs it into the collection that the validation context maintains. (Inherited from ValidationContext.)
Public method LogViolation Creates a validation error, message, or warning. (Inherited from ValidationContext.)
Public method LogWarning Creates a validation warning and logs the message into the collection that the validation context maintains. (Inherited from ValidationContext.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method OnDeleteTask Override to implement OnDelete behavior for the supplied validation task list item.
Public method OnNavigateToTask Override to implement OnNavigate behavior for the supplied validation task list item. The default implementation calls DoCommand on the first item in DiagramNavigateCommands, and executes the ExplorerNavigateCommand, if available.
Public method SetCacheValue<T> Set the cached object associated with the name (Inherited from ValidationContext.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryGetCacheValue<T> Returns whether the cached object associated with the name exist or not (Inherited from ValidationContext.)

Top

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