Beispiel #1
0
 private void ProcessCode(Code code, string writerKey)
 {
     foreach (Directive directive in code.Directives)
     {
         if (directive is DynamicText)
         {
             ProcessDynamicText((DynamicText) directive);
         }
         else if (directive is Text)
         {
             ProcessText((Text) directive, writerKey);
         }
     }
 }
Beispiel #2
0
 private void ProcessSectionCode(Code code)
 {
     foreach (Directive directive in code.Directives)
     {
         if (directive is DynamicText)
         {
             ProcessDynamicText((DynamicText) directive);
         }
         else if (directive is Text)
         {
             ProcessSectionText((Text) directive);
         }
     }
 }
Beispiel #3
0
        private void ParseCodeStart(string line)
        {
            Assertion.Assert(line != null, "line cannot be null.");

            string spaces = line.Substring(0, line.IndexOf(CodeStartDirective));
            Code code = new Code(spaces);
            this.currentDirective.Directives.Add(code);
            this.currentDirective = code;

            this.contextStack.Push(
                new Context(
                    TemplateMode.Dynamic,
                    line.Substring(0, CountLeadingWhiteSpace(line))));
        }