DomainService.ValidationContext Property

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Gets or sets the optional ValidationContext to use for all validation operations invoked by the DomainService.

Namespace:  System.ServiceModel.DomainServices.Server
Assembly:  System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)

Syntax

'Declaration
Protected Property ValidationContext As ValidationContext
    Get
    Set
'Usage
Dim value As ValidationContext

value = Me.ValidationContext

Me.ValidationContext = value
protected ValidationContext ValidationContext { get; set; }
protected:
property ValidationContext^ ValidationContext {
    ValidationContext^ get ();
    void set (ValidationContext^ value);
}
member ValidationContext : ValidationContext with get, set
function get ValidationContext () : ValidationContext
function set ValidationContext (value : ValidationContext)

Property Value

Type: System.ComponentModel.DataAnnotations.ValidationContext
The ValidationContext to use for all validation operations invoked by the DomainService.

Remarks

This property may be set by the developer at any time to be used as the backing IServiceProvider and source of Items. This makes these services and items available to each ValidationAttribute involved in validation.

See Also

Reference

DomainService Class

System.ServiceModel.DomainServices.Server Namespace