Ejemplo n.º 1
0
 public void addOption(AFOptions option)
 {
     if (options == null)
     {
         options = new List<AFOptions>();
     }
     options.Add(option);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Parses and creates option, from which user can choose.
 /// Exception thrown if any error happened during parsing option.
 /// </summary>
 /// <param name="optionJson">JSON object which contains info about option</param>
 /// <returns> created option</returns>
 private AFOptions createOption(JsonObject optionJson)
 {
     AFOptions option = new AFOptions();
     option.setKey((String) Utils.TryToGetValueFromJson(optionJson[Constants.KEY]));
     option.setValue((String) Utils.TryToGetValueFromJson(optionJson[Constants.VALUE]));
     return option;
 }