public CSharpLanguageService()
        {
            IndentationStrategy = new CSharpIndentationStrategy();
            intellisenseJobRunner = new JobRunner();

            Task.Factory.StartNew(() => { intellisenseJobRunner.RunLoop(new CancellationToken()); });
        }
Пример #2
0
        private void runButton_Click(object sender, EventArgs e)
        {
            using (JobRunner jobRunner = new JobRunner())
            {
                jobRunner.ConnectionString = _connectionString;
                jobRunner.Initialize();

                string jobName = jobsComboBox.SelectedItem.ToString();
                jobRunner.Run(jobName);
                MessageBox.Show("Done");
            }
        }
        public IntellisenseManager(TextEditor.TextEditor editor, IIntellisenseControl intellisenseControl, ICompletionAssistant completionAssistant, ILanguageService languageService, ISourceFile file)
        {
            intellisenseJobRunner = new JobRunner();

            Task.Factory.StartNew(() => { intellisenseJobRunner.RunLoop(new CancellationToken()); });

            this.intellisenseControl = intellisenseControl;
            this.completionAssistant = completionAssistant;
            this.languageService = languageService;
            this.file = file;
            this.editor = editor;

            this.editor.LostFocus += Editor_LostFocus;
        }
        public static void Initialize(TestContext context)
        {
            originalHeartbeat = BlueCollarSection.Current.Heartbeat;
            originalRetryTimeout = BlueCollarSection.Current.RetryTimeout;
            BlueCollarSection.Current.Heartbeat = Heartbeat;
            BlueCollarSection.Current.RetryTimeout = RetryTimeout;

            jobStore = JobStore.Create();
            jobStore.DeleteAllJobs();

            jobRunner = new JobRunner(jobStore, Guid.NewGuid().ToString() + ".bin", false, Heartbeat, MaximumConcurrency, RetryTimeout, true, new JobScheduleElement[0]);
            jobRunner.Error += new EventHandler<JobErrorEventArgs>(JobRunnerError);
            jobRunner.Start();
        }
Пример #5
0
        public EditorModel()
        {
            shell = IoC.Get<IShell>();

            codeAnalysisRunner = new JobRunner();
            TextDocument = new TextDocument();

            AnalysisTriggerEvents.Select(_ => Observable.Timer(TimeSpan.FromMilliseconds(500))
            .SelectMany(o => DoCodeAnalysisAsync())).Switch().Subscribe(_ => { });

            //AnalysisTriggerEvents.Throttle(TimeSpan.FromMilliseconds(500)).Subscribe(async _ =>
            //{
            //    await DoCodeAnalysisAsync();
            //});
        }
Пример #6
0
        public void TestExecuteMethodLoadsPluginFromPathAndExecutesIt()
        {
            // Arrange
            var runner = new JobRunner();

            string currentDirectory = Directory.GetCurrentDirectory();
            IJobDetail jobDetail = new JobDetailImpl("jobsettings", typeof(IJob));
            jobDetail.JobDataMap.Add("jobDefinitionPath", Path.Combine(currentDirectory, @"Resourses\Test.Job.config"));
            _mockJobExecutionContext.SetupGet(p => p.JobDetail).Returns(jobDetail);


            // Act
            runner.Execute(_mockJobExecutionContext.Object);

            // Assert
            Assert.True(File.Exists("FakePafFilter1.txt"));
            Assert.True(File.Exists("FakePafFilter2.txt"));
        }
Пример #7
0
 public RunApsimJob(String Name, JobRunner JobRunner)
     : base(Name, JobRunner)
 {
 }
Пример #8
0
 internal CronQuerySetup(JobRunner runner)
 {
     this.runner = runner;
 }