string GetDirectiveName (CaptureCollection names) { string val; foreach (Capture c in names) { val = c.Value; if (Directive.IsDirective (val)) return val; } return tparser.DefaultDirectiveName; }