/// <summary> /// Tries to execute the specified getter method asynchronously with the number of retry attempts specified by the maximumRetryCount input parameter. /// </summary> /// <typeparam name="TResult">The type of the result.</typeparam> /// <param name="method">The getter method to try to execute.</param> /// <param name="successText">The text to use to describe a successfull data operation.</param> /// <param name="errorText">The text to use to describe an unsuccessfull data operation.</param> /// <param name="isMessageSupressed">The value that sepecifies whether the related Feeback.Message should be supressed or not.</param> /// <returns>A GetDataOperationResult object containing the result of the method specified by the method input parameter if it was successfull, or details specifying the error or exception if not.</returns> public Task <GetDataOperationResult <TResult> > TryGetAsync <TResult>(Func <TResult> method, string successText, string errorText, bool isMessageSupressed) { return(UiThreadManager.RunAsynchronously(() => TryGet(method, successText, errorText, isMessageSupressed))); }
/// <summary> /// Tries to execute the specified setter method asynchronously with the number of retry attempts specified by the maximumRetryCount input parameter. /// </summary> /// <param name="method">The setter method to try to execute.</param> /// <param name="successText">The text to use to describe a successfull data operation.</param> /// <param name="errorText">The text to use to describe an unsuccessfull data operation.</param> /// <param name="isMessagePermanent">The value that specifies whether the Feedback object should be removed automatically after a time period or not.</param> /// <param name="isMessageSupressed">The value that sepecifies whether the related Feeback.Message should be supressed or not.</param> /// <returns>A SetDataOperationResult object containing the result and details specifying whether the data operation was a success or not.</returns> public Task <SetDataOperationResult> TrySetAsync(Action method, string successText, string errorText, bool isMessagePermanent, bool isMessageSupressed) { return(UiThreadManager.RunAsynchronously(() => TrySet(method, successText, errorText, isMessagePermanent, isMessageSupressed))); }