Share via


IServiceAdministration.CreateApplication method

Creates an instance of the specified service application type.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

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