Creates a new service object, specifying the interface service type.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'宣言
Protected Overridable Function CreateService ( _
container As IServiceContainer, _
serviceType As Type _
) As Object
'使用
Dim container As IServiceContainer
Dim serviceType As Type
Dim returnValue As Object
returnValue = Me.CreateService(container, _
serviceType)
protected virtual Object CreateService(
IServiceContainer container,
Type serviceType
)
protected:
virtual Object^ CreateService(
IServiceContainer^ container,
Type^ serviceType
)
protected function CreateService(
container : IServiceContainer,
serviceType : Type
) : Object
Parameters
container
Type: System.ComponentModel.Design.IServiceContainerA service provider object to contain the service.
serviceType
Type: System.TypeThe Type of the service to create.
Return Value
Type: System.Object
A new service object for the specified type.
Permissions
- 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.