Compartilhar via


IServiceAdministration.CreateApplication Method

Creates an instance of the specified service application type.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Function CreateApplication ( _
    name As String, _
    serviceApplicationType As Type, _
    provisioningContext As SPServiceProvisioningContext _
) As SPServiceApplication
'Usage
Dim instance As IServiceAdministration
Dim name As String
Dim serviceApplicationType As Type
Dim provisioningContext As SPServiceProvisioningContext
Dim returnValue As SPServiceApplication

returnValue = instance.CreateApplication(name, _
    serviceApplicationType, provisioningContext)
SPServiceApplication CreateApplication(
    string name,
    Type serviceApplicationType,
    SPServiceProvisioningContext provisioningContext
)

Parameters

  • name
    Type: System.String

    The name of the new service application.

  • serviceApplicationType
    Type: System.Type

    The type of the new service application.

Return Value

Type: Microsoft.SharePoint.Administration.SPServiceApplication
A new SPServiceApplication object.

Remarks

Ensure this method is re-entrant by returning the existing instance if it has already been created.

See Also

Reference

IServiceAdministration Interface

IServiceAdministration Members

Microsoft.SharePoint.Administration Namespace