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


C# Engine.Deployment_Execute方法代码示例

本文整理汇总了C#中Microsoft.SPOT.Debugger.Engine.Deployment_Execute方法的典型用法代码示例。如果您正苦于以下问题:C# Engine.Deployment_Execute方法的具体用法?C# Engine.Deployment_Execute怎么用?C# Engine.Deployment_Execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.SPOT.Debugger.Engine的用法示例。


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

示例1: DeployToDevice

        internal static void DeployToDevice(string buildPath, ArrayList referenceList, 
            Engine engine, string transport, bool isDevEnvironment, string assemblyName)
        {
            ArrayList peList = GetPeFileList(buildPath, referenceList, isDevEnvironment, assemblyName, engine);

            // Deploy the pe files to the device.
            Console.Write("\tDeploying the device test..");
            bool isDeployed = engine.Deployment_Execute(peList, false, null);

            if (string.Equals(transport.ToLower(), "emulator"))
            {
                isDeployed = true;
            }

            if (isDeployed)
            {
                Console.WriteLine(" deployed successfully");
            }
            else
            {
                Console.WriteLine(" deployment failure");
                throw new ApplicationException("Unable to deploy the test to the device");
            }
        }
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:24,代码来源:Utils.cs

示例2: OnRun

		protected override void OnRun (DebuggerStartInfo startInfo)
		{
			var mfStartInfo = startInfo as MicroFrameworkDebuggerStartInfo;
			if (mfStartInfo == null)//This should never happen...
				throw new InvalidOperationException ();
			var command = mfStartInfo.MFCommand;
			var portDefinition = ((MicroFrameworkExecutionTarget)command.Target).PortDefinition;
			using (var deployEngine = new Engine (portDefinition)) {
				deployEngine.Start ();

				string newCommand = "/CorDebug_DeployDeviceName:" + portDefinition.PersistName;

				var listOfAseemblies = new ArrayList ();

				//TODO: Check if this is robust enough will "be" and "le" really always be in output folder?
				OutputDirectory = command.OutputDirectory;
				string dir = command.OutputDirectory;
				if (deployEngine.IsTargetBigEndian)
					dir = Path.Combine (dir, "be");
				else
					dir = Path.Combine (dir, "le");

				string[] files = Directory.GetFiles (dir, "*.pe");
				foreach (var file in files) {
					newCommand = "/load:" + file + " " + newCommand;
					using (var fs = new FileStream (file, FileMode.Open)) {
						byte[] data = new byte[fs.Length];
						fs.Read (data, 0, data.Length);
						listOfAseemblies.Add (data);
					}
				}
				startInfo.Command = newCommand;
				deployEngine.Deployment_Execute (listOfAseemblies, false, (str) => OnDebuggerOutput (false, "Deploy: " + str + Environment.NewLine));
				deployEngine.RebootDevice (Engine.RebootOption.RebootClrWaitForDebugger);
			}
			VsPackage.MessageCentre.Session = this;
			try {
				CorDebugProcess process = CorDebugProcess.CreateProcess (new DebugPortSupplier ().FindPort ("USB"), startInfo.Command);
				process.StartDebugging (this, false);
				// StartDebugging() will either get a connected device into a debuggable state and start the dispatch thread, or throw.
			} catch (ProcessExitException) {
				VsPackage.MessageCentre.DeploymentMsg (DiagnosticStrings.InitializeProcessFailedProcessDied);
			} catch (Exception ex) {
				VsPackage.MessageCentre.DeploymentMsg (DiagnosticStrings.InitializeProcessFailed);
				VsPackage.MessageCentre.InternalErrorMsg (false, ex.Message);
			}
		}
开发者ID:Roddoric,项目名称:Monkey.Robotics,代码行数:47,代码来源:MicroFrameworkDebuggerSession.cs


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