AuthorizationContext Constructor (IServiceProvider)
[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.]
Initializes a new instance of the AuthorizationContext class as a template.
Namespace: System.ComponentModel.DataAnnotations
Assembly: System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)
Syntax
'Declaration
Public Sub New ( _
serviceProvider As IServiceProvider _
)
'Usage
Dim serviceProvider As IServiceProvider
Dim instance As New AuthorizationContext(serviceProvider)
public AuthorizationContext(
IServiceProvider serviceProvider
)
public:
AuthorizationContext(
IServiceProvider^ serviceProvider
)
new :
serviceProvider:IServiceProvider -> AuthorizationContext
public function AuthorizationContext(
serviceProvider : IServiceProvider
)
Parameters
- serviceProvider
Type: System.IServiceProvider
Parent IServiceProvider to which calls to GetService can be delegated.
Remarks
This form of the constructor creates only a template AuthorizationContext that cannot be used directly in authorization requests. A template AuthorizationContext has been configured with a set of services and Items that the developer wants to use for authorization requests. It cannot be used directly during authorization, but an alternate form of the constructor allows other AuthorizationContext instances to clone that template's state.
The AuthorizationContext property allows a template to be specified for all authorization requests for the domain service.