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);
        }
示例#2
0
        public string Resolve(IBuildData buildData)
        {
            var resolver = new ContextSourcedContentResolver(buildData?.ContextSets);

            return(resolver.Resolve(this.Value));
        }