public MediumTestGgpDebugQueryTargetCompRoot(ServiceManager serviceManager,
                                              IDialogUtil dialogUtil,
                                              IGameletClientFactory gameletClientFactory =
                                              null) : base(serviceManager, dialogUtil)
 {
     _gameletClientFactory = gameletClientFactory;
 }
 // Constructor for tests.
 public GgpDebugQueryTarget(IFileSystem fileSystem, SdkConfig.Factory sdkConfigFactory,
                            IGameletClientFactory gameletClientFactory,
                            IApplicationClientFactory applicationClientFactory,
                            CancelableTask.Factory cancelableTaskFactory,
                            IDialogUtil dialogUtil, IRemoteDeploy remoteDeploy,
                            DebugSessionMetrics metrics,
                            ICredentialManager credentialManager,
                            ITestAccountClientFactory testAccountClientFactory,
                            IGameletSelectorFactory gameletSelectorFactory,
                            ICloudRunner cloudRunner, Versions.SdkVersion sdkVersion,
                            ChromeClientLaunchCommandFormatter launchCommandFormatter,
                            DebugEngine.DebugEngine.Params.Factory paramsFactory,
                            IYetiVSIService yetiVsiService, IGameLauncher gameLauncher)
 {
     _fileSystem               = fileSystem;
     _sdkConfigFactory         = sdkConfigFactory;
     _gameletClientFactory     = gameletClientFactory;
     _applicationClientFactory = applicationClientFactory;
     _cancelableTaskFactory    = cancelableTaskFactory;
     _dialogUtil               = dialogUtil;
     _remoteDeploy             = remoteDeploy;
     _metrics                  = metrics;
     _credentialManager        = credentialManager;
     _testAccountClientFactory = testAccountClientFactory;
     _cloudRunner              = cloudRunner;
     _yetiVsiService           = yetiVsiService;
     _gameletSelectorFactory   = gameletSelectorFactory;
     _sdkVersion               = sdkVersion;
     _launchCommandFormatter   = launchCommandFormatter;
     _paramsFactory            = paramsFactory;
     _gameLauncher             = gameLauncher;
 }
        public override IGameletClientFactory GetGameletClientFactory()
        {
            if (_gameletClientFactory == null)
            {
                _gameletClientFactory = new GameletClientStub.Factory();
            }

            return(_gameletClientFactory);
        }
Beispiel #4
0
 public MediumTestDebugEngineFactoryCompRoot(ServiceManager serviceManager,
                                             JoinableTaskContext taskContext,
                                             IGameletClientFactory gameletClientFactory,
                                             IWindowsRegistry windowsRegistry)
 {
     _serviceManager       = serviceManager;
     _taskContext          = taskContext;
     _gameletClientFactory = gameletClientFactory;
     _windowsRegistry      = windowsRegistry;
 }
Beispiel #5
0
 public SshManager(IGameletClientFactory gameletClientFactory, ICloudRunner cloudRunner,
                   ISshKeyLoader sshKeyLoader, ISshKnownHostsWriter sshKnownHostsWriter,
                   IRemoteCommand remoteCommand)
 {
     this.gameletClientFactory = gameletClientFactory;
     this.cloudRunner          = cloudRunner;
     this.sshKeyLoader         = sshKeyLoader;
     this.sshKnownHostsWriter  = sshKnownHostsWriter;
     this.remoteCommand        = remoteCommand;
 }
        IVSFake CreateVsFakeAndLoadProject(IGameletClientFactory gameletClientFactory)
        {
            IVSFake vsFake = CreateVsFake(gameletClientFactory);

            // For this test we don't need to launch / build binaries. The test assets contain
            // fake binaries in StubTestSample/GGP/Debug.
            vsFake.ProjectAdapter.Load(_sampleName);
            (vsFake.ProjectAdapter as ProjectAdapter)?.SetDeployOnLaunch(
                DeployOnLaunchSetting.FALSE);

            return(vsFake);
        }
        IVSFake CreateVsFake(IGameletClientFactory gameletClientFactory)
        {
            var serviceManager = new MediumTestServiceManager(_taskContext, CreateVsiOptions());

            _compRoot = new MediumTestDebugEngineFactoryCompRoot(
                serviceManager, _taskContext, gameletClientFactory,
                TestDummyGenerator.Create <IWindowsRegistry>());

            IDebugEngine2 CreateDebugEngine() =>
            _compRoot.CreateDebugEngineFactory().Create(null);

            InitVsFakeCompRoot(serviceManager, gameletClientFactory);
            return(_vsFakeCompRoot.Create(CreateDebugEngine));
        }
Beispiel #8
0
 public GameletSelectorFactory(IDialogUtil dialogUtil, ICloudRunner runner,
                               InstanceSelectionWindow.Factory gameletSelectionWindowFactory,
                               CancelableTask.Factory cancelableTaskFactory,
                               IGameletClientFactory gameletClientFactory,
                               ISshManager sshManager, IRemoteCommand remoteCommand,
                               IGameLaunchBeHelper gameLaunchBeHelper,
                               JoinableTaskContext taskContext)
 {
     _dialogUtil = dialogUtil;
     _runner     = runner;
     _gameletSelectionWindowFactory = gameletSelectionWindowFactory;
     _cancelableTaskFactory         = cancelableTaskFactory;
     _gameletClientFactory          = gameletClientFactory;
     _sshManager         = sshManager;
     _remoteCommand      = remoteCommand;
     _gameLaunchBeHelper = gameLaunchBeHelper;
     _taskContext        = taskContext;
 }
Beispiel #9
0
 public GameletSelectorLegacyFlow(
     IDialogUtil dialogUtil, ICloudRunner runner,
     InstanceSelectionWindow.Factory gameletSelectionWindowFactory,
     CancelableTask.Factory cancelableTaskFactory,
     IGameletClientFactory gameletClientFactory, ISshManager sshManager,
     IRemoteCommand remoteCommand, ActionRecorder actionRecorder)
 {
     _dialogUtil = dialogUtil;
     _runner     = runner;
     _gameletSelectionWindowFactory = gameletSelectionWindowFactory;
     _cancelableTaskFactory         = cancelableTaskFactory;
     _gameletClientFactory          = gameletClientFactory;
     _sshManager    = sshManager;
     _remoteCommand = remoteCommand;
     _mountChecker  =
         new GameletMountChecker(remoteCommand, dialogUtil, cancelableTaskFactory);
     _actionRecorder = actionRecorder;
 }
        void InitVsFakeCompRoot(ServiceManager serviceManager,
                                IGameletClientFactory gameletClientFactory)
        {
            var config = new VSFakeCompRoot.Config {
                SamplesRoot = _sampleDir
            };
            var dialogUtil = new DialogUtilFake();

            var debugTargetCompRoot =
                new MediumTestGgpDebugQueryTargetCompRoot(serviceManager, dialogUtil,
                                                          gameletClientFactory);

            _taskContext.RunOnMainThread(() =>
            {
                var debugTargetWrapperFactory = new GgpDebugQueryTargetWrapperFactory(
                    debugTargetCompRoot.Create(), _taskContext, new ManagedProcess.Factory());
                _vsFakeCompRoot = new VSFakeCompRoot(config, debugTargetWrapperFactory,
                                                     _taskContext, _nLogSpy.GetLogger());
            });
        }
 public GameletSelector(IDialogUtil dialogUtil, ICloudRunner runner,
                        InstanceSelectionWindow.Factory gameletSelectionWindowFactory,
                        CancelableTask.Factory cancelableTaskFactory,
                        IGameletClientFactory gameletClientFactory, ISshManager sshManager,
                        IRemoteCommand remoteCommand, IGameLaunchBeHelper gameLaunchBeHelper,
                        JoinableTaskContext taskContext, ActionRecorder actionRecorder)
 {
     _dialogUtil = dialogUtil;
     _runner     = runner;
     _gameletSelectionWindowFactory = gameletSelectionWindowFactory;
     _cancelableTaskFactory         = cancelableTaskFactory;
     _gameletClientFactory          = gameletClientFactory;
     _sshManager    = sshManager;
     _remoteCommand = remoteCommand;
     _mountChecker  =
         new GameletMountChecker(remoteCommand, dialogUtil, cancelableTaskFactory);
     _gameLaunchBeHelper = gameLaunchBeHelper;
     _taskContext        = taskContext;
     _actionRecorder     = actionRecorder;
 }