public static string Format(string format, IPropertyProvider propertyProvider) { if (string.IsNullOrEmpty(format)) { return(string.Empty); } var ppf = PropertyProviderFormat.Parse(format); return(ppf.Format(propertyProvider)); }
static Exception _TryParse(string text, out PropertyProviderFormat result) { var items = ParseCore(text).ToArray(); if (items.OfType <Error>().Any()) { result = null; return(Failure.NotParsable("text", typeof(PropertyProviderFormat))); } result = new PropertyProviderFormat(items); return(null); }
public static bool TryParse(string text, out PropertyProviderFormat result) { return(_TryParse(text, out result) == null); }
public override string Eval(IPropertyProvider pp) { return(Convert.ToString(PropertyProviderFormat.Eval(pp, _text))); }