IsLocalTrialGenuine static method

int IsLocalTrialGenuine()

It verifies whether trial has started and is genuine or not. The verification is done locally.

Returns LexStatusCodes LA_OK, LA_LOCAL_TRIAL_EXPIRED, and LA_FAIL.

This function must be called on every start of your program during the trial period. Note: The function is only meant for local(unverified) trials.

The function throws a LexActivatorException on error.

Implementation

static int IsLocalTrialGenuine() {
  int status = _lexActivatorNative.IsLocalTrialGenuine();
  switch (status) {
    case LexStatusCodes.LA_OK:
      return LexStatusCodes.LA_OK;
    case LexStatusCodes.LA_LOCAL_TRIAL_EXPIRED:
      return LexStatusCodes.LA_LOCAL_TRIAL_EXPIRED;
    case LexStatusCodes.LA_FAIL:
      return LexStatusCodes.LA_FAIL;
    default:
      throw LexActivatorException(status);
  }
}