Esempio n. 1
0
        public static string Interpolate(this string str, object ctx, IDictionary <string, object> ctx2 = null, string controlKey = null, Action <StringInterpolation> setup = null)
        {
            var si = new StringInterpolation();

            if (null != setup)
            {
                setup(si);
            }
            return(si.Interpolate(str, ctx, ctx2, controlKey));
        }
 public void CanReplaceWithEmptiesIfNoSourceGiven(string src, string result)
 {
     Assert.AreEqual(result, _si.Interpolate(src));
 }