public static void SetToaster(IMatToaster toaster) { if (_toaster == null) { _toaster = toaster; } }
public GenerateReportAction(EtherClient client, NavigationManager uriHelper, IMatToaster toaster, ILogger <GenerateReportAction> logger) { _client = client; _navigation = uriHelper; _toaster = toaster; _logger = logger; }
public static void AddErrors(this IMatToaster toaster, IEnumerable <string> errors) { foreach (var error in errors) { toaster.Add(error, MatToastType.Danger); } }
public UserService(HttpClient httpClient , IMatToaster Toaster , NavigationManager NavigationManager) { _NavigationManager = NavigationManager; _Toaster = Toaster; _httpClient = httpClient; }
public SignalRService(IMatToaster toaster, IConfiguration configuration, IAccessTokenProvider tokenProvider, SignOutSessionStateManager sessionStateManager, NavigationManager navigationManager) { _toaster = toaster ?? throw new ArgumentNullException(); _configurtion = configuration ?? throw new ArgumentNullException(); _tokenProvider = tokenProvider; _sessionStateManager = sessionStateManager; _navigationManager = navigationManager; }
public EtherClient(HttpClient httpClient, NavigationManager navigation, IMatToaster toaster, ILogger <EtherClient> logger) { // WebAssemblyHttpMessageHandler.DefaultCredentials = FetchCredentialsOption.Include; _httpClient = httpClient; _navigation = navigation; _toaster = toaster; _logger = logger; httpClient.BaseAddress = GetApiUrl(); }
public static void NotifyResult(this IMatToaster toaster, Result result, string dataName) { if (result.OperationPass) { toaster.NotifySuccess("Modification effectuée", dataName + " sauvegardé avec succès"); } else { toaster.NotifyFail("Echec de la modification", dataName + " n'a pu être modifié." + "\n\r" + result.ErrorMessage); } }
public AuthService(HttpClient httpClient, ILocalStorageService localStorageService , NavigationManager NavigationManager , AuthenticationStateProvider authenticationStateProvider , IMatToaster Toaster) { _Toaster = Toaster; _authenticationStateProvider = authenticationStateProvider; _NavigationManager = NavigationManager; _httpClient = httpClient; _localStorageService = localStorageService; }
public SharedTools(IMatToaster toast, ILocalStorageService localStorage, ISessionStorageService sessionStorage, NavigationManager uriHelper, SessionManager session) { Toast = toast; LocalStorage = localStorage; SessionStorage = sessionStorage; UriHelper = uriHelper; Session = session; }
public ErrorSuccesApiHandler( IBaseApi apiClient, INotificationsService notificationsService, IAuthService authService, IMatToaster matToaster, ILogger <ErrorSuccesApiHandler> logger) { _apiClient = apiClient; _notificationsService = notificationsService; _authService = authService; _matToaster = matToaster; _logger = logger; }
/// <summary> /// Displays a notification with information about successful encryption or decryption. /// </summary> /// <param name="notification"></param> /// <param name="crypt">Mode of text conversion(encryption or decryption).</param> /// <exception cref="ArgumentOutOfRangeException">Unknown conversion mode.</exception> public static void ShowSuccessCrypt(this IMatToaster notification, Cipher.CryptMode crypt) { switch (crypt) { case Cipher.CryptMode.Decrypt: notification.Add("The text has been successfully decrypted.", MatToastType.Success, "Successfully"); break; case Cipher.CryptMode.Encrypt: notification.Add("The text has been successfully encrypted.", MatToastType.Success, "Successfully"); break; default: throw new ArgumentOutOfRangeException(nameof(crypt), crypt, null); } }
public static async Task CatchAndDisplayErrors(this IMatToaster matToaster, Func <Task> action) { try { await action(); } catch (AccessTokenNotAvailableException exception) { exception.Redirect(); } catch (BussinessException ex) { matToaster.Add( message: ex.GetErrorMessage(), type: MatToastType.Danger, title: "Operation Failed"); } }
/// <summary> /// Displays a notification with information about successful file upload. /// </summary> /// <param name="notification"></param> public static void ShowSuccessUploading(this IMatToaster notification) { notification.Add("The file was uploaded successfully.", MatToastType.Success, "Successfully"); }
public static void NotifyFail(this IMatToaster toaster, string title, string message) { toaster.Add(message, MatToastType.Danger, title); }
public FetchPullRequests(EtherClient client, IMatToaster toaster) { _client = client; _toaster = toaster; }
public PoopersViewModel(HttpClientService httpClientService, IMatToaster toaster) { m_httpClientService = httpClientService; m_toaster = toaster; }
public UserService(UserRepository userRepo, IMatToaster toaster) { _userRepo = userRepo; Toaster = toaster; }
public ViewNotifier(IMatToaster matToaster) { this.matToaster = matToaster; }
public static void NotifySuccess(this IMatToaster toaster, string title, string message) { toaster.Add(message, MatToastType.Success, title); }
/// <summary> /// Display a notification with information about the error. /// </summary> /// <param name="notification"></param> /// <param name="errorMessage">Text of the error that will be displayed inside the notification.</param> public static void ShowError(this IMatToaster notification, string errorMessage) { notification.Add(errorMessage, MatToastType.Danger, "Error"); }
public ToasterService(IMatToaster toaster) { _toaster = toaster; }
public FetchWorkItems(EtherClient client, IMatToaster toaster) { _client = client; _toaster = toaster; }
public static void ShowSuccessSending(this IMatToaster notification) { notification.Add("The message was sent successfully!", MatToastType.Success, "Successfully"); }
public HelperService(NavigationManager navigationManager, IMatToaster toaster) { this._navigationManager = navigationManager; this._toaster = toaster; }
public DeleteProfile(EtherClient client, IMatToaster toaster) { _client = client; _toaster = toaster; }
public DeleteRepository(EtherClient client, IMatToaster toaster) { _client = client; _toaster = toaster; }