Share via


SPAppCatalog.TryGetAppInstance method

Gets an app instance using the identifier returned by the Install operation.

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

Syntax

'Declaration
Public Shared Function TryGetAppInstance ( _
    site As SPSite, _
    appInstanceId As Guid, _
    <OutAttribute> ByRef instance As SPAppInstance _
) As Boolean
'Usage
Dim site As SPSite
Dim appInstanceId As Guid
Dim instance As SPAppInstance
Dim returnValue As Boolean

returnValue = SPAppCatalog.TryGetAppInstance(site, _
    appInstanceId, instance)
public static bool TryGetAppInstance(
    SPSite site,
    Guid appInstanceId,
    out SPAppInstance instance
)

Parameters

  • appInstanceId
    Type: System.Guid

    The identifier of the app instance.

Return value

Type: System.Boolean
true if the app instance exists, false if it doesn't.

Remarks

If the app instance has any localizable properties (like Title), they will be localized based on the current thread's CurrentUICulture.

See also

Reference

SPAppCatalog class

SPAppCatalog members

Microsoft.SharePoint.Administration namespace