GenerateOfflineDeactivationRequest static method

int GenerateOfflineDeactivationRequest({
  1. required String filePath,
})

Generates the offline deactivation request file needed for deactivation of the license in the dashboard at filePath and deactivates the license locally.

A valid offline deactivation file confirms that the license has been successfully deactivated on the user's machine.

Returns LexStatusCodes LA_OK, and LA_FAIL.

The function throws a LexActivatorException on error.

Implementation

static int GenerateOfflineDeactivationRequest({
  required String filePath,
}) {
  int status = _lexActivatorNative.GenerateOfflineDeactivationRequest(
    filePath,
  );
  switch (status) {
    case LexStatusCodes.LA_OK:
      return LexStatusCodes.LA_OK;
    case LexStatusCodes.LA_FAIL:
      return LexStatusCodes.LA_FAIL;
    default:
      throw LexActivatorException(status);
  }
}