Esempio n. 1
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));
 }
Esempio n. 2
0
 /// <summary>
 /// Create the <seealso cref="System.Runtime.Remoting.Contexts.Context"/>
 /// to associate the <paramref name="gceInstance"/>.
 /// </summary>
 /// <param name="gceInstance">GCE VM instance object.</param>
 /// <param name="dialogWindow">The dialog window</param>
 public AttachDebuggerContext(Instance gceInstance, AttachDebuggerWindow dialogWindow)
 {
     GceInstance  = gceInstance.ThrowIfNull(nameof(gceInstance));
     DialogWindow = dialogWindow.ThrowIfNull(nameof(dialogWindow));
     PublicIp     = gceInstance.GetPublicIpAddress();
     DebuggerPort = new AttachDebuggerFirewallPort(
         DebuggerPortInfo,
         Resources.AttachDebuggerRemoteToolsPortDescription,
         gceInstance,
         _lazyDataSource);
     RemotePowerShellPort = new AttachDebuggerFirewallPort(
         RemotePowerShellPortInfo,
         Resources.AttachDebuggerRemotePowerShellPortDescription,
         gceInstance,
         _lazyDataSource);
 }