public ToastConfig SetAction(Action <ToastAction> action) { var cfg = new ToastAction(); action(cfg); return(this.SetAction(cfg)); }
public ToastConfig SetAction(ToastAction action) { this.Action = action; if (action.TextColor == null) { action.TextColor = DefaultActionTextColor; } return(this); }
/// <summary> Gets toast action. </summary> /// <exception cref="ArgumentNullException"> Thrown when one or more required arguments are null. </exception> /// <param name="action"> The action. </param> /// <returns> The toast action. </returns> private AcrDialogs.ToastAction GetToastAction(UserDialogToastAction action) { if (action == null) { throw new ArgumentNullException(nameof(action)); } var result = new AcrDialogs.ToastAction(); if (action.Text != null) { result.Text = action.Text; } if (action.TextColor != null) { result.TextColor = action.TextColor; } if (action.Action != null) { result.Action = action.Action; } return(result); }
public ToastConfig SetAction(ToastAction action) { this.Action = action; return(this); }