Compartilhar via


WebContextBase.Current 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 the context that is registered as a lifetime object with the current application.

Namespace:  System.ServiceModel.DomainServices.Client.ApplicationServices
Assembly:  System.ServiceModel.DomainServices.Client.Web (in System.ServiceModel.DomainServices.Client.Web.dll)

Syntax

'Declaration
Public Shared ReadOnly Property Current As WebContextBase
    Get
'Usage
Dim value As WebContextBase

value = WebContextBase.Current
public static WebContextBase Current { get; }
public:
static property WebContextBase^ Current {
    WebContextBase^ get ();
}
static member Current : WebContextBase
static function get Current () : WebContextBase

Property Value

Type: System.ServiceModel.DomainServices.Client.ApplicationServices.WebContextBase
The context that is registered as a lifetime object with the current application.

Exceptions

Exception Condition
InvalidOperationException

No context has been added to this property.

See Also

Reference

WebContextBase Class

System.ServiceModel.DomainServices.Client.ApplicationServices Namespace