SPAppCatalog.GetAppInstance method (SPWeb, Guid)

Gets all SPAppInstance objects using the given identifier returned by the CreateAppInstance method.

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

Syntax

'Declaration
Public Shared Function GetAppInstance ( _
    web As SPWeb, _
    appInstanceId As Guid _
) As SPAppInstance
'Usage
Dim web As SPWeb
Dim appInstanceId As Guid
Dim returnValue As SPAppInstance

returnValue = SPAppCatalog.GetAppInstance(web, _
    appInstanceId)
public static SPAppInstance GetAppInstance(
    SPWeb web,
    Guid appInstanceId
)

Parameters

Return value

Type: Microsoft.SharePoint.Administration.SPAppInstance
All SPAppInstance objects for the given web and appInstanceId values.

Exceptions

Exception Condition
System.ArgumentNullException

The web parameter or the appInstanceId parameter values are a null reference (Nothing in Visual Basic).

System.InvalidOperationException

No SPAppInstance objects were found.

See also

Reference

SPAppCatalog class

SPAppCatalog members

GetAppInstance overload

Microsoft.SharePoint.Administration namespace