Пример #1
0
        public TemplateVisualizer(DebugTemplate template, string output, List<InterpEvent> allEvents, List<TemplateMessage> errors)
        {
            InitializeComponent();

            templatesTree.Items.Add(new RootEvent(template, 0, output.Length));
            txtOutput.Document = new FlowDocument(new Paragraph(new Run(output)));
        }
Пример #2
0
        int exprStop; // template pattern location

        #endregion Fields

        #region Constructors

        public EvalExprEvent(DebugTemplate self, int start, int stop, int exprStart, int exprStop)
            : base(self, start, stop)
        {
            if (self == null)
                throw new ArgumentNullException("self");

            this.exprStart = exprStart;
            this.exprStop = exprStop;
            expr = self.code.template.Substring(exprStart, exprStop - exprStart + 1);
        }
Пример #3
0
        public InterpEvent(DebugTemplate template, int start, int stop)
        {
            if (template == null)
                throw new ArgumentNullException("template");
            if (start > stop)
                throw new ArgumentException();

            this.Template = template;
            this.Start = start;
            this.Stop = stop;
        }
Пример #4
0
 public RootEvent(DebugTemplate template, int start, int stop)
     : base(template, start, stop)
 {
 }