SPImportContext class
SharePoint 2013
Detects if the event or feature activation of the code that calls this class is a part of the import context.
Namespace:
Microsoft.SharePoint.Deployment
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
SPImportContext has no public constructors. Get a reference to an SPImportContext from the Current property.
This class is used by event receivers of feature activation to detect if they are in the context of an import operation.
SPImportContext specifies whether an import is occurring or not for a given thread.