Beispiel #1
0
        public override void Execute(Stack <object> model, TextWriter output)
        {
            var m = _templateMemberAccessor.GetMember(model);

            foreach (var i in (IEnumerable)m)
            {
                model.Push(i);
                _content.Execute(model, output);
                model.Pop();
            }
        }
Beispiel #2
0
        public void Execute(object model, TextWriter output)
        {
            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }
            if (output == null)
            {
                throw new ArgumentNullException(nameof(output));
            }
            var modelStack = new Stack <object>();

            modelStack.Push(model);
            _root.Execute(modelStack, output);
        }