public void SetUp() { var source = "hello {{name}}. are you a {{animal}}{{non-existent}}? is your name {{{name}}}?"; var stack = new Stack<IEnumerable<IContextItem>>(); stack.Push(new[] { new ContextItem("name", "banjo"), new ContextItem("animal", "hippo") }); stack.Push(new[] { new ContextItem("name", "sandy") }); var sut = new ContextSourcedContentResolver(stack); this.result = sut.Resolve(source); }
public string Resolve(IBuildData buildData) { var resolver = new ContextSourcedContentResolver(buildData?.ContextSets); return(resolver.Resolve(this.Value)); }