public void Evaluate() { if (Result == null) { OnTaskFailed?.Invoke(this); } }
// Proxied java calls. Method names are camelCase to match the corresponding java methods. public void onFailure(AndroidJavaObject exception) { var message = exception.Call <string>("getMessage"); int errorCode; try { // If exception is not a TaskException, this call will throw an AndroidJavaException. errorCode = exception.Call <int>("getErrorCode"); } catch (AndroidJavaException) { errorCode = PlayCoreConstants.InternalErrorCode; } PlayCoreEventHandler.HandleEvent(() => OnTaskFailed.Invoke(message, errorCode)); }
/// <summary> /// Reports the task failure. /// </summary> /// <param name="taskId">The task identifier.</param> /// <param name="clientId">The client identifier.</param> public static void ReportTaskFailure(string taskId, string clientId) { OnTaskFailed?.Invoke(taskId, clientId); }