/// <summary> Login asynchronous. </summary> /// <param name="title"> (Optional) The title. </param> /// <param name="message"> (Optional) The message. </param> /// <param name="cancelToken"> (Optional) The cancel token. </param> /// <returns> The asynchronous result that yields an UserDialogLoginResult. </returns> public async Task <UserDialogLoginResult> LoginAsync(string title = null, string message = null, CancellationToken?cancelToken = null) { AcrDialogs.LoginResult result = await AcrDialogs.UserDialogs.Instance.LoginAsync(title, message, cancelToken); return(ConvertLoginResult(result)); }
/// <summary> Login asynchronous. </summary> /// <param name="config"> The configuration. </param> /// <param name="cancelToken"> (Optional) The cancel token. </param> /// <returns> The asynchronous result that yields an UserDialogLoginResult. </returns> public async Task <UserDialogLoginResult> LoginAsync(UserDialogLoginConfig config, CancellationToken?cancelToken = null) { AcrDialogs.LoginResult result = await AcrDialogs.UserDialogs.Instance.LoginAsync(GetLoginConfig(config), cancelToken); return(ConvertLoginResult(result)); }
/// <summary> Convert login result. </summary> /// <param name="result"> The result. </param> /// <returns> The login converted result. </returns> private UserDialogLoginResult ConvertLoginResult(AcrDialogs.LoginResult result) { return((result == null) ? null : new UserDialogLoginResult(result.Ok, result.LoginText, result.Password)); }