Exemplo n.º 1
0
        private static void WriteItems(XmlWriter writer, SectionNode section)
        {
            ComponentEvaluationScope scope = ComponentEvaluationScope.Current;

            var items = (IEnumerable)scope.ComponentNode.Parameters["source"];

            foreach (object item in items)
            {
                scope.ViewParameters["item"] = item;
                WriteXml(writer, section.Nodes);
            }
        }
 public ComponentEvaluationScope(ComponentNode componentNode)
 {
     _componentNode = componentNode;
     _previous = (ComponentEvaluationScope) Local.Data[CurrentComponentEvaluationScopeKey];
     Local.Data[CurrentComponentEvaluationScopeKey] = this;
 }
Exemplo n.º 3
0
 public ComponentEvaluationScope(ComponentNode componentNode)
 {
     _componentNode = componentNode;
     _previous      = (ComponentEvaluationScope)Local.Data[CurrentComponentEvaluationScopeKey];
     Local.Data[CurrentComponentEvaluationScopeKey] = this;
 }