public virtual IValueFormatter GetValueFormatter(string spelling, TextManager manager) { IValueFormatter formatter = null; if (!ValueFormatters.Any(x => (formatter = x.GetFor(spelling, this, manager)) != null)) { throw new LocalizedKeyNotFoundException("Exceptions.ValueFormatterNotFound", "No parameter evaluator found for {0}", new { Text = spelling }); } return(formatter); }
public bool CanSerialize(RestValue value) { var type = Nullable.GetUnderlyingType(value.Type); if (type == null) { return(false); } var typeValue = new RestValue(value.Value, type); return(ValueFormatters.Any(x => x.CanSerialize(typeValue))); }
public override bool CanSerialize(RestValue value) { return(ValueFormatters.Any(x => x.CanSerialize(value))); }