コード例 #1
0
 /// <summary>
 /// Starts the DebugService if it's not already strated
 /// </summary>
 /// <param name="editorOperations">
 /// An IEditorOperations implementation used to interact with the editor.
 /// </param>
 public void StartDebugService(IEditorOperations editorOperations)
 {
     if (this.DebugService == null)
     {
         this.RemoteFileManager = new RemoteFileManager(this.PowerShellContext, editorOperations, logger);
         this.DebugService      = new DebugService(this.PowerShellContext, this.RemoteFileManager, logger);
     }
 }
コード例 #2
0
        /// <summary>
        /// Starts a debug-only session using the provided IConsoleHost implementation
        /// for the ConsoleService.
        /// </summary>
        /// <param name="powerShellContext"></param>
        /// <param name="editorOperations">
        /// An IEditorOperations implementation used to interact with the editor.
        /// </param>
        public void StartDebugSession(
            PowerShellContext powerShellContext,
            IEditorOperations editorOperations)
        {
            this.PowerShellContext = powerShellContext;

            // Initialize all services
            this.RemoteFileManager = new RemoteFileManager(this.PowerShellContext, editorOperations, logger);
            this.DebugService      = new DebugService(this.PowerShellContext, this.RemoteFileManager, logger);

            // Create a workspace to contain open files
            this.Workspace = new Workspace(this.PowerShellContext.LocalPowerShellVersion.Version, this.logger);
        }
コード例 #3
0
        /// <summary>
        /// Perform some kind of control action
        /// </summary>
        /// <returns></returns>
        public bool Execute(string remoteHost, string login, string password)
        {
            bool success = false;

            try
            {
                // ONLY HANDLE FTP FOR NOW
                //
                // AJL - Append DateTime so we don't overwrite existing info
                string remote = Globals.DeviceClass.ResultsURL + "/" + Target + "." + DateTime.Now.Ticks;

                success = RemoteFileManager.UploadFile(new Uri(remote), Source);
                if (!success)
                {
                    Logger.Warn("Failed uploading results '" + Source + "' to '" + remote + "'");
                }
            }
            catch (Exception e)
            {
                Logger.Warn("Exception uploading file: " + e.Message);
            }
            return(success);
        }