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
site
Type: Microsoft.SharePoint.SPSiteThe site the app instance is installed to.
appInstanceId
Type: System.GuidThe identifier of the app instance.
instance
Type: Microsoft.SharePoint.Administration.SPAppInstanceThe instance of the app corresponding to the appInstanceId parameter.
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.