Beispiel #1
0
 /**
  * Method that sets instance variables to avoid repetition in constructors.
  *
  * @param name - The name of the message action.
  * @param text - The text in the message action.
  * @param value - A way to ID the message action.
  * @param type - The type of action, usually button.
  * @param confirm - The MessageActionConfirmation for this action, a pop up confirming the user's actions.
  * @param options - A list of MessageActionOptions holding the options for the action. Usually buttons.
  */
 private void Initialize(string name, string text, string value, string type, MessageActionConfirm confirm, List <MessageActionOption> options)
 {
     _name    = name;
     _text    = text;
     _value   = value;
     _type    = type;
     _confirm = confirm?.Build();
     if (options != null)
     {
         foreach (MessageActionOption option in options)
         {
             _options.Add(option.Build());
         }
     }
 }
Beispiel #2
0
 public MessageAction(string name, string text, string value, string type, MessageActionConfirm confirm, List <MessageActionOption> options)
 {
     Initialize(name, text, value, type, confirm, options);
 }
Beispiel #3
0
 public MessageAction(string text, MessageActionConfirm confirm)
 {
     Initialize(text, text, "", Constants.BUTTON, confirm, null);
 }