Exemplo n.º 1
0
        public MainWindow()
        {
            logger = new FileLogger(new DefaultLogFormatter(), "LogInspect.log");
            //logger = new ConsoleLogger(new DefaultLogFormatter());

            appViewModel = new AppViewModel(logger);

            patternLibraryModule            = new PatternLibraryModule(logger, new DirectoryEnumerator(), new PatternLibLoader());
            inlineColoringRuleLibraryModule = new InlineFormatLibraryModule(logger, new DirectoryEnumerator(), new InlineColoringRuleLibLoader());
            formatHandlerLibraryModule      = new FormatHandlerLibraryModule(logger, new DirectoryEnumerator(), new FormatHandlerLoader(), patternLibraryModule);

            patternLibraryModule.LoadDirectory(Properties.Settings.Default.PatternsFolder);
            inlineColoringRuleLibraryModule.LoadDirectory(Properties.Settings.Default.InlineFormatsFolder);
            formatHandlerLibraryModule.LoadDirectory(Properties.Settings.Default.FormatHandlersFolder);

            InitializeComponent();
            DataContext = appViewModel;

            //-NoSelfLogging "E:\FTP\BNP\8202573775\RuleEngine.txt.3"
            string[] args = Environment.GetCommandLineArgs();
            if (args != null)
            {
                foreach (string arg in args.Skip(1))
                {
                    if (arg.StartsWith("-"))
                    {
                        if (arg == "-SelfLogging")
                        {
                            Open("LogInspect.log").Wait();
                        }
                    }
                    else
                    {
                        Open(arg).Wait();
                    }
                }
            }
        }
Exemplo n.º 2
0
 public InlineParserFactoryModule(ILogger Logger, IRegexBuilder RegexBuilder, IInlineFormatLibraryModule InlineFormatLibraryModule) : base(Logger)
 {
     AssertParameterNotNull(RegexBuilder, "RegexBuilder", out regexBuilder);
     AssertParameterNotNull(InlineFormatLibraryModule, "InlineFormatLibraryModule", out inlineFormatLibraryModule);
 }