コード例 #1
0
        /// <summary>
        /// Create the step that gets the remote machine processes list and attach to one of the processes.
        /// </summary>
        public static ListProcessStepViewModel CreateStep(AttachDebuggerContext context)
        {
            var content = new ListProcessStepContent();
            var step    = new ListProcessStepViewModel(content, context);

            content.DataContext = step;
            return(step);
        }
        /// <summary>
        /// Create the the step that enables Visual Studio remote debugging tool port.
        /// </summary>
        public static EnablePowerShellPortStepViewModel CreateStep(AttachDebuggerContext context)
        {
            var content = new EnablePortStepContent();
            var step    = new EnablePowerShellPortStepViewModel(content, context);

            content.DataContext = step;
            return(step);
        }
コード例 #3
0
 private ListProcessStepViewModel(
     ListProcessStepContent content,
     AttachDebuggerContext context)
     : base(context)
 {
     Content        = content;
     RefreshCommand = new ProtectedCommand(() => GetAllProcessesList());
 }
コード例 #4
0
        /// <summary>
        /// Creates the step that installs and starts debugger remote tool.
        /// </summary>
        public static InstallStartRemoteToolStepViewModel CreateStep(AttachDebuggerContext context)
        {
            var content = new InstallStartRemoteToolStepContent();
            var step    = new InstallStartRemoteToolStepViewModel(content, context);

            content.DataContext = step;
            return(step);
        }
コード例 #5
0
        /// <summary>
        /// Create the step that set credential
        /// </summary>
        public static SetCredentialStepViewModel CreateStep(AttachDebuggerContext context)
        {
            var content = new SetCredentialStepContent();
            var step    = new SetCredentialStepViewModel(content, context);

            content.DataContext = step;
            return(step);
        }
コード例 #6
0
 private HelpStepViewModel(
     HelpStepContent content,
     AttachDebuggerContext context)
     : base(context)
 {
     Content         = content;
     HelpLinkCommand = new ProtectedCommand(() => Process.Start(HelpLink));
 }
        public AttachDebuggerWindowViewModel(Instance gceInstance, AttachDebuggerWindow dialogWindow)
        {
            OKCommand     = new ProtectedAsyncCommand(() => ExceuteAsync(OnOKCommand), canExecuteCommand: false);
            CancelCommand = new ProtectedCommand(OnCancelCommand, canExecuteCommand: false);

            var context   = new AttachDebuggerContext(gceInstance, dialogWindow);
            var firstStep = SetCredentialStepViewModel.CreateStep(context);

            ErrorHandlerUtils.HandleExceptionsAsync(() => ExceuteAsync(() => GotoStep(firstStep)));
        }
コード例 #8
0
 /// <summary>
 /// Initializes an instance of the <seealso cref="EnablePortStepViewModel"/> class.
 /// </summary>
 /// <param name="content">The associated user control.</param>
 /// <param name="port">The port to open.</param>
 /// <param name="context">The <seealso cref="AttachDebuggerContext"/> object.</param>
 public EnablePortStepViewModel(
     EnablePortStepContent content,
     AttachDebuggerFirewallPort port,
     AttachDebuggerContext context)
     : base(context)
 {
     Content = content;
     _port   = port;
     SetStage(Stage.Init);
     EnablePortHelpLinkCommand = new ProtectedCommand(() => Process.Start(EnablePortHelpLink));
 }
コード例 #9
0
 private SetCredentialStepViewModel(SetCredentialStepContent content, AttachDebuggerContext context)
     : base(context)
 {
     Content = content;
     ManageCredentialsCommand = new ProtectedCommand(() =>
     {
         ManageWindowsCredentialsWindow.PromptUser(context.GceInstance);
         UpdateCredentials();
         IsOKButtonEnabled = Credentials.Any();
     });
 }
コード例 #10
0
 private InstallStartRemoteToolStepViewModel(
     InstallStartRemoteToolStepContent content,
     AttachDebuggerContext context)
     : base(context)
 {
     _installer = new RemoteToolInstaller(
         Context.PublicIp,
         Context.Credential.User,
         Context.Credential.Password,
         ToolsPathProvider.GetRemoteDebuggerToolsPath());
     Content = content;
 }
 private EnablePowerShellPortStepViewModel(EnablePortStepContent content, AttachDebuggerContext context)
     : base(content, context.RemotePowerShellPort, context)
 {
 }
コード例 #12
0
 public AttachDebuggerStepBase(AttachDebuggerContext context)
 {
     _cancellationTokenSource = new CancellationTokenSource();
     CancelToken = _cancellationTokenSource.Token;
     Context     = context;
 }
コード例 #13
0
 private EnableDebuggerPortStepViewModel(EnablePortStepContent content, AttachDebuggerContext context)
     : base(content, context.DebuggerPort, context)
 {
 }