示例#1
0
        public static string ToXml(StandardDsl dsl)
        {
            var nodeWriter = new NodeWriter();

            using (var scope = new DslEvaluationScope(nodeWriter))
            {
                dsl.Execute();
            }

            return(ToXml(nodeWriter));
        }
        public static string ToXml(StandardDsl dsl)
        {
            var nodeWriter = new NodeWriter();

            using (var scope = new DslEvaluationScope(nodeWriter))
            {
                dsl.Execute();
            }

            return ToXml(nodeWriter);
        }
 public DslEvaluationScope(NodeWriter nodeWriter)
 {
     _nodeWriter = nodeWriter;
     _previous = (DslEvaluationScope) Local.Data[CurrentDslEvaluationScopeKey];
     Local.Data[CurrentDslEvaluationScopeKey] = this;
 }
示例#4
0
 public DslEvaluationScope(NodeWriter nodeWriter)
 {
     _nodeWriter = nodeWriter;
     _previous   = (DslEvaluationScope)Local.Data[CurrentDslEvaluationScopeKey];
     Local.Data[CurrentDslEvaluationScopeKey] = this;
 }