当前位置: 首页>>代码示例>>C#>>正文


C# IExecutionHandler类代码示例

本文整理汇总了C#中IExecutionHandler的典型用法代码示例。如果您正苦于以下问题:C# IExecutionHandler类的具体用法?C# IExecutionHandler怎么用?C# IExecutionHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IExecutionHandler类属于命名空间,在下文中一共展示了IExecutionHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetExecutionHandler

		public override IExecutionHandler GetExecutionHandler ()
		{
			if (handler == null)
				handler = new IronPythonExecutionHandler ();
			
			return handler;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:IronPythonRuntime.cs

示例2: Connect

		public Task Connect (NUnitVersion version, IExecutionHandler executionHandler = null, OperationConsole console = null)
		{
			var exePath = Path.Combine (Path.GetDirectoryName (GetType ().Assembly.Location), version.ToString (), "NUnitRunner.exe");
			connection = new RemoteProcessConnection (exePath, executionHandler, console, Runtime.MainSynchronizationContext);
			connection.AddListener (this);
			return connection.Connect ();
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:7,代码来源:ExternalTestRunner.cs

示例3: CanExecute

		public bool CanExecute (IExecutionHandler handler)
		{
			if (runCheckDelegate != null)
				return runCheckDelegate (handler);
			else if (cmd != null)
				return handler.CanExecute (cmd);
			else
				return false;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:9,代码来源:CommandExecutionContext.cs

示例4: TestContext

		public TestContext (ITestProgressMonitor monitor, IExecutionHandler executionContext, DateTime testDate)
		{
			this.monitor = monitor;
			if (executionContext == null)
				executionContext = Runtime.ProcessService.DefaultExecutionHandler;
			this.executionContext = executionContext;
			// Round to seconds
			this.testDate = new DateTime ((testDate.Ticks / TimeSpan.TicksPerSecond) * TimeSpan.TicksPerSecond);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:9,代码来源:TestContext.cs

示例5: ExecutionContext

		public ExecutionContext (IExecutionHandler executionHandler, IConsoleFactory consoleFactory, ExecutionTarget target)
		{
			var targetedHandler = executionHandler as ITargetedExecutionHandler;
			if (targetedHandler != null)
				target = targetedHandler.Target ?? target;

			this.executionHandler = executionHandler;
			this.consoleFactory = consoleFactory;
			this.executionTarget = target;
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:10,代码来源:ExecutionContext.cs

示例6: ProcessHostController

		public ProcessHostController (string id, uint stopDelay, IExecutionHandler executionHandlerFactory)
		{
			if (string.IsNullOrEmpty (id))
				id = "?";
			this.id = id;
			this.stopDelay = stopDelay;
			this.executionHandlerFactory = executionHandlerFactory;
			timer = new Timer ();
			timer.AutoReset = false;
			timer.Elapsed += new System.Timers.ElapsedEventHandler (WaitTimeout);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:11,代码来源:ProcessHostController.cs

示例7: BackTest

 public BackTest(
     IEventBus eventBus,
     IDataHandler bars, 
     IStrategy strategy, 
     IPortfolio portfolio, 
     IExecutionHandler executionHandler)
 {
     this.eventBus = eventBus;
     this.bars = bars;
     this.strategy = strategy;
     this.portfolio = portfolio;
     this.executionHandler = executionHandler;
     this.stopWatch = new Stopwatch();
 }
开发者ID:afedyanin,项目名称:event-driven-backtesting,代码行数:14,代码来源:BackTest.cs

示例8: Execute

		public IAsyncOperation Execute (IBuildTarget entry, IExecutionHandler handler)
		{
			ExecutionContext context = new ExecutionContext (handler, IdeApp.Workbench.ProgressMonitors);
			return Execute (entry, context);
		}
开发者ID:nocache,项目名称:monodevelop,代码行数:5,代码来源:ProjectOperations.cs

示例9: RunSelectedTest

		void RunSelectedTest (IExecutionHandler mode)
		{
			RunTest (TreeView.GetSelectedNode (), mode);
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:4,代码来源:TestPad.cs

示例10: RunTest

		public IAsyncOperation RunTest (UnitTest test, IExecutionHandler mode)
		{
			return RunTest (FindTestNode (test), mode, false);
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:4,代码来源:TestPad.cs

示例11: RunTest

		internal IAsyncOperation RunTest (UnitTest test, IExecutionHandler context, bool buildOwnerObject, bool checkCurrentRunOperation)
		{
			string testName = test.FullName;
			
			if (buildOwnerObject) {
				IBuildTarget bt = test.OwnerObject as IBuildTarget;
				if (bt != null && bt.NeedsBuilding (IdeApp.Workspace.ActiveConfiguration)) {
					if (!IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted) {
						MonoDevelop.Ide.Commands.StopHandler.StopBuildOperations ();
						IdeApp.ProjectOperations.CurrentRunOperation.WaitForCompleted ();
					}
	
					AsyncOperation retOper = new AsyncOperation ();
					
					IAsyncOperation op = IdeApp.ProjectOperations.Build (bt);
					retOper.TrackOperation (op, false);
						
					op.Completed += delegate {
						// The completed event of the build operation is run in the gui thread,
						// so we need a new thread, because refreshing must be async
						System.Threading.ThreadPool.QueueUserWorkItem (delegate {
							if (op.Success) {
								RefreshTests ();
								test = SearchTest (testName);
								if (test != null) {
									Gtk.Application.Invoke (delegate {
										// RunTest must run in the gui thread
										retOper.TrackOperation (RunTest (test, context, false), true);
									});
								}
								else
									retOper.SetCompleted (false);
							}
						});
					};
					
					return retOper;
				}
			}
			
			if (checkCurrentRunOperation && !IdeApp.ProjectOperations.ConfirmExecutionOperation ())
				return NullProcessAsyncOperation.Failure;
			
			Pad resultsPad = IdeApp.Workbench.GetPad <TestResultsPad>();
			if (resultsPad == null) {
				resultsPad = IdeApp.Workbench.ShowPad (new TestResultsPad (), "MonoDevelop.NUnit.TestResultsPad", GettextCatalog.GetString ("Test results"), "Bottom", "md-solution");
			}
			
			// Make the pad sticky while the tests are runnig, so the results pad is always visible (even if minimized)
			// That's required since when running in debug mode, the layout is automatically switched to debug.
			
			resultsPad.Sticky = true;
			resultsPad.BringToFront ();
			
			TestSession session = new TestSession (test, context, (TestResultsPad) resultsPad.Content);
			
			session.Completed += delegate {
				Gtk.Application.Invoke (delegate {
					resultsPad.Sticky = false;
				});
			};

			OnTestSessionStarting (new TestSessionEventArgs { Session = session, Test = test });

			session.Start ();

			if (checkCurrentRunOperation)
				IdeApp.ProjectOperations.CurrentRunOperation = session;
			
			return session;
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:71,代码来源:NUnitService.cs

示例12: TargetedExecutionHandler

		public TargetedExecutionHandler (IExecutionHandler handler, ExecutionTarget target)
		{
			Target = target;
			Handler = handler;
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:5,代码来源:TargetedExecutionHandler.cs

示例13: CreateExternalProcessObject

		public IDisposable CreateExternalProcessObject (Type type, IExecutionHandler executionHandler, IList<string> userAssemblyPaths = null)
		{
			CheckRemoteType (type);
			return (IDisposable)GetHost (type.ToString (), false, executionHandler).CreateInstance (type.Assembly.Location, type.FullName, GetRequiredAddins (type), userAssemblyPaths);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:5,代码来源:ProcessService.cs

示例14: GetHost

		ProcessHostController GetHost (string id, bool shared, IExecutionHandler executionHandler)
		{
			if (!shared)
				return new ProcessHostController (id, 0, executionHandler);
			
			lock (this) {
				if (externalProcess == null)
					externalProcess = new ProcessHostController ("SharedHostProcess", 10000, null);
	
				return externalProcess;
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:12,代码来源:ProcessService.cs

示例15: CanExecuteFile

		public bool CanExecuteFile (string file, IExecutionHandler handler)
		{
			ExecutionContext context = new ExecutionContext (handler, IdeApp.Workbench.ProgressMonitors.ConsoleFactory, IdeApp.Workspace.ActiveExecutionTarget);
			return CanExecuteFile (file, context);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:5,代码来源:ProjectOperations.cs


注:本文中的IExecutionHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。