예제 #1
0
 private BaseCommand()
 {
     Stats = new CommandStats();
 }
예제 #2
0
        public HtmlOutput(SearchOptions options, IOrderedEnumerable <IGrouping <string, FoundLine> > foundlines, CommandStats stats) : base(options, foundlines, stats)
        {
            _headerTemplatePath   = HtmlTemplateDirectory("header.html");
            _contentTemplatePath  = HtmlTemplateDirectory("content.html");
            _lineHeadTemplatePath = HtmlTemplateDirectory("line-head.html");
            _lineTemplatePath     = HtmlTemplateDirectory("line.html");
            _lineFootTemplatePath = HtmlTemplateDirectory("line-foot.html");
            _footerTemplatePath   = HtmlTemplateDirectory("footer.html");

            if (File.Exists(_headerTemplatePath))
            {
                _headerTemplate = File.ReadAllText(_headerTemplatePath);
            }
            if (File.Exists(_contentTemplatePath))
            {
                _contentTemplate = File.ReadAllText(_contentTemplatePath);
            }
            if (File.Exists(_lineHeadTemplatePath))
            {
                _lineHeadTemplate = File.ReadAllText(_lineHeadTemplatePath);
            }
            if (File.Exists(_lineTemplatePath))
            {
                _lineTemplate = File.ReadAllText(_lineTemplatePath);
            }
            if (File.Exists(_lineFootTemplatePath))
            {
                _lineFootTemplate = File.ReadAllText(_lineFootTemplatePath);
            }
            if (File.Exists(_footerTemplatePath))
            {
                _footerTemplate = File.ReadAllText(_footerTemplatePath);
            }
        }
예제 #3
0
 public ConsoleOutput(SearchOptions options, IOrderedEnumerable <IGrouping <string, FoundLine> > foundlines, CommandStats stats) : base(options, foundlines, stats)
 {
 }
예제 #4
0
 public ProcessFiles(SearchOptions options, IOrderedEnumerable <IGrouping <string, FoundLine> > foundFiles, CommandStats stats) : base(options, foundFiles, stats)
 {
 }
예제 #5
0
 public SearchProcess(SearchOptions options, IOrderedEnumerable <IGrouping <string, FoundLine> > foundlines, CommandStats stats)
 {
     Options             = options;
     FoundLineCollection = foundlines;
     Stats = stats;
 }