Share via


AuthorizationContext.GetService 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.]

Returns a service of the specified service type.

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

Syntax

'Declaration
Public Function GetService ( _
    serviceType As Type _
) As Object
'Usage
Dim instance As AuthorizationContext
Dim serviceType As Type
Dim returnValue As Object

returnValue = instance.GetService(serviceType)
public Object GetService(
    Type serviceType
)
public:
virtual Object^ GetService(
    Type^ serviceType
) sealed
abstract GetService : 
        serviceType:Type -> Object 
override GetService : 
        serviceType:Type -> Object 
public final function GetService(
    serviceType : Type
) : Object

Parameters

  • serviceType
    Type: System.Type
    The type of the service needed.

Return Value

Type: System.Object
An instance of that service or nulla null reference (Nothing in Visual Basic) if it is not available.

Implements

IServiceProvider.GetService(Type)

See Also

Reference

AuthorizationContext Class

System.ComponentModel.DataAnnotations Namespace