• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IExecutionHandler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Execute

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


示例17: ExecuteFile

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


示例18: IsValidForRemoteHosting

		public bool IsValidForRemoteHosting (IExecutionHandler handler)
		{
			string location = Path.GetDirectoryName (System.Reflection.Assembly.GetExecutingAssembly ().Location);
			location = Path.Combine (location, "mdhost.exe");
			return handler.CanExecute (new DotNetExecutionCommand (location));
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:6,代码来源:ProcessService.cs


示例19: ExecutionContext

		public ExecutionContext (IExecutionHandler executionHandler, IConsoleFactory consoleFactory)
		{
			this.executionHandler = executionHandler;
			this.consoleFactory = consoleFactory;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:5,代码来源:ExecutionContext.cs


示例20: TestSession

		public TestSession (UnitTest test, IExecutionHandler context, TestResultsPad resultsPad)
		{
			this.test = test;
			this.context = context;
			this.monitor = new TestMonitor (resultsPad);
			this.resultsPad = resultsPad;
			resultsPad.InitializeTestRun (test);
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:8,代码来源:NUnitService.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IExecutor类代码示例发布时间:2022-05-24
下一篇:
C# IExecutionContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap