Share via


DomainService.IsAuthorized Method

[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.]

Requests authorization for the specified DomainOperationEntry.

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

Syntax

'Declaration
Public Function IsAuthorized ( _
    domainOperationEntry As DomainOperationEntry, _
    entity As Object _
) As AuthorizationResult
'Usage
Dim instance As DomainService
Dim domainOperationEntry As DomainOperationEntry
Dim entity As Object
Dim returnValue As AuthorizationResult

returnValue = instance.IsAuthorized(domainOperationEntry, _
    entity)
public AuthorizationResult IsAuthorized(
    DomainOperationEntry domainOperationEntry,
    Object entity
)
public:
AuthorizationResult^ IsAuthorized(
    DomainOperationEntry^ domainOperationEntry, 
    Object^ entity
)
member IsAuthorized : 
        domainOperationEntry:DomainOperationEntry * 
        entity:Object -> AuthorizationResult 
public function IsAuthorized(
    domainOperationEntry : DomainOperationEntry, 
    entity : Object
) : AuthorizationResult

Parameters

  • entity
    Type: System.Object
    Optional entity instance to authorize. nulla null reference (Nothing in Visual Basic) is acceptable for queries or when determining whether an operation can be performed outside the context of a submit. However, during a submit or an invoke, if an entity instance is available, this value will not be nulla null reference (Nothing in Visual Basic).

Return Value

Type: System.ComponentModel.DataAnnotations.AuthorizationResult
The results of authorization. Allowed indicates the authorization request is allowed. Any other value indicates it was denied.

See Also

Reference

DomainService Class

System.ServiceModel.DomainServices.Server Namespace