コード例 #1
0
ファイル: InteractionClass.cs プロジェクト: Antash/sda
 public void Build()
 {
     WorkbenchSingleton.SafeThreadAsyncCall(() =>
     {
         var build            = new SDBuild();
         build.BuildComplete +=
             delegate(object sender, EventArgs e)
         {
             if (((Build)sender).LastBuildResults.ErrorCount == 0)
             {
                 if (((Build)sender).LastBuildResults.BuiltProjects.Count > 0)
                 {
                     var project = ((Build)sender).LastBuildResults.BuiltProjects[0] as AbstractProject;
                     if (project != null)
                     {
                         StateHolder.Instance.ProjectBuildState = StateHolder.ProjectBuildStates.Succeded;
                         SDIntegration.Instance.CopyToIsoStorage(project.OutputAssemblyFullPath);
                         SDIntegration.Instance.OnBuildSuccess(false);
                     }
                 }
             }
             else
             {
                 StateHolder.Instance.ProjectBuildState = StateHolder.ProjectBuildStates.Fault;
                 SDIntegration.Instance.OnBuildFailure();
             }
             if (StateHolder.Instance.SaveRequired())
             {
                 SDIntegration.Instance.OnProjectSave();
             }
         };
         build.Run();
     });
 }
コード例 #2
0
        public override void Run()
        {
            var build = new SDBuild();

            build.BuildComplete +=
                delegate
            {
                if (build.LastBuildResults.ErrorCount == 0)
                {
                    if (build.LastBuildResults.BuiltProjects.Count > 0)
                    {
                        var project = build.LastBuildResults.BuiltProjects[0] as AbstractProject;
                        if (project != null)
                        {
                            // If build successfull we need to copy assembly and debug info to iso storage
                            // Than attach debugger and finaly notify Ext. Application to start loading addin assembly
                            // This order is needed to debug addin from the very beginning.
                            SDIntegration.Instance.CopyToIsoStorage(project.OutputAssemblyFullPath);
                            SDIntegration.Instance.AttachToHost();
                            SDIntegration.Instance.OnBuildSuccess(true);
                        }
                    }
                    LoggingService.Info("Debugger Command: Start (withDebugger=" + withDebugger + ")");
                }
                else
                {
                    SDIntegration.Instance.OnBuildFailure();
                }
            };
            build.Run();
        }