public static object ToPair(this NameParameterWithCalculation parameter)
 {
     return(new
     {
         Name = parameter.GetDesignation(),
         Description = parameter.GetDescription(),
         Value = parameter.GetName()
     });
 }
 public static object ToParameter(this NameParameterWithCalculation parameter, double?value, bool correct)
 {
     return(new
     {
         Name = parameter.GetName(),
         Designation = parameter.GetDesignation(),
         Description = parameter.GetDescription(),
         Unit = parameter.GetUnit().GetDesignation(),
         Value = value.HasValue ? value.Value.ToString() : "_",
         Correct = correct
     });
 }
        public static dynamic ToRestriction(this NameParameterWithCalculation parameter, ConditionType conditionType, double value)
        {
            dynamic result = new ExpandoObject();

            result.name            = parameter.GetDesignation();
            result.description     = parameter.GetDescription();
            result.unit            = parameter.GetUnit().GetDesignation();
            result.condition       = conditionType.GetDesignation();
            result.value           = value;
            result.restrictionName = parameter.GetName();
            return(result);
        }