ServiceManager.GetService Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Retrieves the requested service. This method returns nulla null reference (Nothing in Visual Basic) if the service could not be located.
Namespace: System.Activities.Design
Assembly: System.Activities.Design.Base (in System.Activities.Design.Base.dll)
Syntax
'Declaration
Public MustOverride Function GetService ( _
serviceType As Type _
) As Object
'Usage
Dim instance As ServiceManager
Dim serviceType As Type
Dim returnValue As Object
returnValue = instance.GetService(serviceType)
public abstract Object GetService(
Type serviceType
)
public:
virtual Object^ GetService(
Type^ serviceType
) abstract
public abstract function GetService(
serviceType : Type
) : Object
abstract GetService :
serviceType:Type -> Object
Parameters
- serviceType
Type: System.Type
The type of service to retrieve.
Return Value
Type: System.Object
Returns Object, which is an instance of the service, or nulla null reference (Nothing in Visual Basic) if the service has not been published.
Implements
IServiceProvider.GetService(Type)
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | serviceType is nulla null reference (Nothing in Visual Basic). |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 4