VsValidationContext Class

Definition

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

public ref class VsValidationContext : Microsoft::VisualStudio::Modeling::Validation::ValidationContext
public class VsValidationContext : Microsoft.VisualStudio.Modeling.Validation.ValidationContext
type VsValidationContext = class
    inherit ValidationContext
Public Class VsValidationContext
Inherits ValidationContext
Inheritance
VsValidationContext

Constructors

VsValidationContext(String[], IEnumerable<ModelElement>, IServiceProvider)

Constructor.

VsValidationContext(String[], IEnumerable<ModelElement>, IServiceProvider, Type)

Constructor.

VsValidationContext(String[], ModelElement, IServiceProvider)

Constructor.

VsValidationContext(String[], ModelElement, IServiceProvider, Type)

Constructor.

VsValidationContext(ValidationCategories, IEnumerable<ModelElement>, IServiceProvider)

Constructor.

VsValidationContext(ValidationCategories, IEnumerable<ModelElement>, IServiceProvider, Type)

Constructor.

VsValidationContext(ValidationCategories, ModelElement, IServiceProvider)

Constructor.

VsValidationContext(ValidationCategories, ModelElement, IServiceProvider, Type)

Constructor.

Properties

Categories

Returns the validation context.

(Inherited from ValidationContext)
CurrentViolations

Returns the readonly collection of reported validation messages.

(Inherited from ValidationContext)
CustomCategories

Returns the custom validation strings user specified via ValidationController.ValidateCustom API

(Inherited from ValidationContext)
ModelExplorerToolWindow

Gets the model explorer tool window associated with this validation context.

ServiceProvider

Returns the service associated with this context.

ValidationSubjects

Get the read only collection of ModelElements to be validated.

(Inherited from ValidationContext)

Methods

ConstructValidationMessage(String, String, ViolationType, ModelElement[])

Overrideable method to allow the derived class to create messages.

GetCache<T>()

Get the Cache object of a given class. Constructs an object if none already exists in this ValidationContext.

(Inherited from ValidationContext)
GetCache<T>(String)

Get a Cache object of a given class and name. Constructs an object if none already exists in this ValidationContext.

(Inherited from ValidationContext)
GetDiagramNavigationCommands(IList<ModelElement>)

Override to supply one or more diagram navigation commands for the referenced elements.

GetDiagramNavigationTargets(ModelElement)

Get the list of shapes associated with the referenced model elements, that we can target for navigation.

GetDiagramNavigationTargetSubstitutes(ModelElement)

Gets a list of zero-or-more substitute shapes for the given target.

GetExplorerNavigationCommand(IList<ModelElement>)

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.

GetNavigationCommands(ValidationMessage)

Full list of navigation commands for this validation message. Default implementation concatentates the DiagramNavigateCommands with the ExplorerNavigateCommand.

GetNavigationProxyModelElements(ModelElement)

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.

LogError(String, String, ModelElement[])

Create a new validation error and log a message into the collection maintained by the validation context

(Inherited from ValidationContext)
LogFatal(String, String, ModelElement[])

Create a new validation fatal error and log a message into the collection maintained by the validation context

(Inherited from ValidationContext)
LogMessage(String, String, ModelElement[])

Create a new validation information and log a message into the collection maintained by the validation context

(Inherited from ValidationContext)
LogViolation(ViolationType, String, String, ModelElement[])

Create a new validation error, message or warning based on passed in violationType enum value. The validation message into the collection maintained by the validation context

(Inherited from ValidationContext)
LogWarning(String, String, ModelElement[])

Create a new validation warning and log a message into the collection maintained by the validation context

(Inherited from ValidationContext)
OnDeleteTask(ValidationTask)

Override to implement OnDelete behavior for the supplied validation task list item.

OnNavigateToTask(ValidationTask)

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.

SetCacheValue<T>(String, T)

Set the cached object associated with the name

(Inherited from ValidationContext)
TryGetCacheValue<T>(String, T)

Returns whether the cached object associated with the name exist or not

(Inherited from ValidationContext)

Applies to