public Factory(DebugProcess.Factory debugProcessFactory, ProcessListRequest.Factory processListRequestFactory, CancelableTask.Factory cancelableTaskFactory, IDialogUtil dialogUtil, ISshManager sshManager, IMetrics metrics, string developerAccount) { _debugProcessFactory = debugProcessFactory; _processListRequestFactory = processListRequestFactory; _cancelableTaskFactory = cancelableTaskFactory; _dialogUtil = dialogUtil; _sshManager = sshManager; _metrics = metrics; _developerAccount = developerAccount; }
// Creates a DebugPortSupplier. This will be invoked by Visual Studio based on this class // Guid being in the registry. public DebugPortSupplier() { // Factory creation for the PortSupplier entry point. var serviceManager = new ServiceManager(); IExtensionOptions options = ((YetiVSIService)serviceManager.RequireGlobalService(typeof(YetiVSIService))) .Options; var taskContext = serviceManager.GetJoinableTaskContext(); var debugPropertyFactory = new DebugProperty.Factory(); var debugProgramFactory = new DebugProgram.Factory(debugPropertyFactory, options); var debugProcessFactory = new DebugProcess.Factory(debugProgramFactory); var managedProcessFactory = new ManagedProcess.Factory(); var processListRequestFactory = new ProcessListRequest.Factory(managedProcessFactory); var jsonUtil = new JsonUtil(); var sdkConfigFactory = new SdkConfig.Factory(jsonUtil); var credentialConfigFactory = new CredentialConfig.Factory(jsonUtil); var accountOptionLoader = new VsiAccountOptionLoader(options); var credentialManager = new CredentialManager(credentialConfigFactory, accountOptionLoader); _developerAccount = credentialManager.LoadAccount(); _dialogUtil = new DialogUtil(); var progressDialogFactory = new ProgressDialog.Factory(); _cancelableTaskFactory = new CancelableTask.Factory(taskContext, progressDialogFactory); var cloudConnection = new CloudConnection(); // NOTE: this CloudRunner is re-used for all subsequent Attach to Process windows. _cloudRunner = new CloudRunner(sdkConfigFactory, credentialManager, cloudConnection, new GgpSDKUtil()); var sshKeyLoader = new SshKeyLoader(managedProcessFactory); var sshKnownHostsWriter = new SshKnownHostsWriter(); _gameletClientFactory = new GameletClient.Factory(); var sshManager = new SshManager(_gameletClientFactory, _cloudRunner, sshKeyLoader, sshKnownHostsWriter, new RemoteCommand(managedProcessFactory)); _metrics = (IMetrics)serviceManager.RequireGlobalService(typeof(SMetrics)); _debugPortFactory = new DebugPort.Factory( debugProcessFactory, processListRequestFactory, _cancelableTaskFactory, _dialogUtil, sshManager, _metrics, _developerAccount); }
DebugPort(DebugProcess.Factory debugProcessFactory, ProcessListRequest.Factory processListRequestFactory, CancelableTask.Factory cancelableTaskFactory, IDialogUtil dialogUtil, ISshManager sshManager, IMetrics metrics, Gamelet gamelet, IDebugPortSupplier2 supplier, string debugSessionId, string developerAccount) { _debugProcessFactory = debugProcessFactory; _processListRequestFactory = processListRequestFactory; _dialogUtil = dialogUtil; _guid = Guid.NewGuid(); _supplier = supplier; _developerAccount = developerAccount; _cancelableTaskFactory = cancelableTaskFactory; _sshManager = sshManager; _debugSessionMetrics = new DebugSessionMetrics(metrics); _debugSessionMetrics.DebugSessionId = debugSessionId; _actionRecorder = new ActionRecorder(_debugSessionMetrics); Gamelet = gamelet; }