public BackgroundParser(RazorEngineHost host, string fileName)
        {
            _main = new MainThreadState(fileName);
            _bg   = new BackgroundThread(_main, host, fileName);

            _main.ResultsReady += (sender, args) => OnResultsReady(args);
        }
        public BackgroundParser(RazorProjectEngine projectEngine, string filePath, string projectDirectory, string fileKind)
        {
            _main = new MainThreadState();
            _bg   = new BackgroundThread(_main, projectEngine, filePath, projectDirectory, fileKind);

            _main.ResultsReady += (sender, args) => OnResultsReady(args);
        }
Exemple #3
0
            public BackgroundParser(RazorEditorParser parser, string filePath)
            {
                _main = new MainThreadState(filePath);
                _bg   = new BackgroundThread(_main, parser, filePath);

                _main.ResultsReady += (sender, args) => OnResultsReady(args);
            }
        public BackgroundParser(RazorEngineHost host, string fileName)
        {
            _main = new MainThreadState(fileName);
            _bg = new BackgroundThread(_main, host, fileName);

            _main.ResultsReady += (sender, args) => OnResultsReady(args);
        }
Exemple #5
0
        public BackgroundParser(RazorTemplateEngine templateEngine, string filePath)
        {
            _main = new MainThreadState(filePath);
            _bg   = new BackgroundThread(_main, templateEngine, filePath);

            _main.ResultsReady += (sender, args) => OnResultsReady(args);
        }
Exemple #6
0
            public BackgroundThread(MainThreadState main, RazorEngineHost host, string fileName)
            {
                // Run on MAIN thread!
                _main             = main;
                _backgroundThread = new Thread(WorkerLoop);
                _shutdownToken    = _main.CancelToken;
                _host             = host;
                _fileName         = fileName;

                SetThreadId(_backgroundThread.ManagedThreadId);
            }
Exemple #7
0
                public BackgroundThread(MainThreadState main, RazorEditorParser parser, string fileName)
                {
                    // Run on MAIN thread!
                    _main          = main;
                    _shutdownToken = _main.CancelToken;
                    _parser        = parser;
                    _filePath      = fileName;

                    _backgroundThread = new Thread(WorkerLoop);
                    SetThreadId(_backgroundThread.ManagedThreadId);
                }
Exemple #8
0
            public BackgroundThread(MainThreadState main, RazorTemplateEngine templateEngine, string fileName)
            {
                // Run on MAIN thread!
                _main           = main;
                _shutdownToken  = _main.CancelToken;
                _templateEngine = templateEngine;
                _filePath       = fileName;

                _backgroundThread = new Thread(WorkerLoop);
                SetThreadId(_backgroundThread.ManagedThreadId);
            }
Exemple #9
0
 public BackgroundThread(MainThreadState main, RazorProjectEngine projectEngine, string filePath, string projectDirectory)
 {
     // Run on MAIN thread!
     _main             = main;
     _shutdownToken    = _main.CancelToken;
     _projectEngine    = projectEngine;
     _filePath         = filePath;
     _relativeFilePath = GetNormalizedRelativeFilePath(filePath, projectDirectory);
     _projectDirectory = projectDirectory;
     _backgroundThread = new Thread(WorkerLoop);
     SetThreadId(_backgroundThread.ManagedThreadId);
 }
            public BackgroundThread(MainThreadState main, RazorEngineHost host, string fileName)
            {
                // Run on MAIN thread!
                _main = main;
                _backgroundThread = new Thread(WorkerLoop);
                _shutdownToken = _main.CancelToken;
                _host = host;
                _fileName = fileName;

                SetThreadId(_backgroundThread.ManagedThreadId);
            }