Esempio n. 1
0
        public VsClient(string visualStudioVersion, string rootSuffix, VsixRunnerSettings settings)
        {
            _visualStudioVersion = visualStudioVersion;
            _rootSuffix          = rootSuffix;
            _settings            = settings;

            _devEnvPath = GetDevEnvPath();
        }
Esempio n. 2
0
        public VsixTestCollection(ITestAssembly testAssembly, ITypeInfo collectionDefinition,
                                  string visualStudioVersion, string rootSuffix)
            : base(testAssembly, collectionDefinition, visualStudioVersion + " (" + rootSuffix + ")")
        {
            VisualStudioVersion = visualStudioVersion;
            RootSuffix          = rootSuffix;

            var settingsAttribute = testAssembly.Assembly.GetCustomAttributes(typeof(VsixRunnerAttribute)).FirstOrDefault();

            if (settingsAttribute == null)
            {
                Settings = new VsixRunnerSettings();
            }
            else
            {
                Settings = new VsixRunnerSettings(
                    settingsAttribute.GetInitializedArgument <int?>(nameof(VsixRunnerSettings.DebuggerAttachRetries)),
                    settingsAttribute.GetInitializedArgument <int?>(nameof(VsixRunnerSettings.RemoteConnectionRetries)),
                    settingsAttribute.GetInitializedArgument <int?>(nameof(VsixRunnerSettings.ProcessStartRetries)),
                    settingsAttribute.GetInitializedArgument <int?>(nameof(VsixRunnerSettings.RetrySleepInterval)),
                    settingsAttribute.GetInitializedArgument <int?>(nameof(VsixRunnerSettings.StartupTimeout)));
            }
        }