Exemple #1
0
 public ActionResult <IEnumerable <string> > Get()
 {
     if (_evaluator.IsEnabled(Features.DummyOn))
     {
         return(new string[] { "value1", "value2" });
     }
     else
     {
         return(new string[] { });
     }
 }
        public IActionResult GetById([FromRoute] Features id)
        {
            var definition = _evaluator.Definitions.SingleOrDefault(d => d.Id == (int)id);

            if (definition != null)
            {
                bool isEnabled = _evaluator.IsEnabled(id, 0);
                return(new JsonResult(isEnabled));
            }

            return(NotFound());
        }