Example #1
0
 public Clients(
     IGalleryClient gallery,
     V3IndexClient v3Index,
     V2V3SearchClient v2v3Search,
     FlatContainerClient flatContainer,
     RegistrationClient registration,
     NuGetExeClient nuGetExe,
     SymbolServerClient symbolServerClient)
 {
     Gallery            = gallery;
     V3Index            = v3Index;
     V2V3Search         = v2v3Search;
     FlatContainer      = flatContainer;
     Registration       = registration;
     NuGetExe           = nuGetExe;
     SymbolServerClient = symbolServerClient;
 }
Example #2
0
        /// <summary>
        /// In lieu of proper dependency injection, initialize dependencies manually.
        /// </summary>
        private static Clients InitializeInternal(TestSettings testSettings)
        {
            var azureManagementAPI = GetAzureManagementAPIWrapper(testSettings);

            var httpClient         = new SimpleHttpClient();
            var gallery            = new GalleryClient(httpClient, testSettings, azureManagementAPI);
            var v3Index            = new V3IndexClient(httpClient, testSettings);
            var v2v3Search         = new V2V3SearchClient(httpClient, v3Index, testSettings, azureManagementAPI);
            var flatContainer      = new FlatContainerClient(httpClient, v3Index);
            var registration       = new RegistrationClient(httpClient, v3Index);
            var nuGetExe           = new NuGetExeClient(testSettings, gallery);
            var symbolServerClient = new SymbolServerClient(testSettings);

            return(new Clients(
                       gallery,
                       v3Index,
                       v2v3Search,
                       flatContainer,
                       registration,
                       nuGetExe,
                       symbolServerClient));
        }
Example #3
0
        /// <summary>
        /// In lieu of proper dependency injection, initialize dependencies manually.
        /// </summary>
        private static Clients InitializeInternal(TestSettings testSettings)
        {
            // Ensure that SSLv3 is disabled and that Tls v1.2 is enabled.
            ServicePointManager.SecurityProtocol &= ~SecurityProtocolType.Ssl3;
            ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;

            var httpClient         = new SimpleHttpClient();
            var gallery            = new GalleryClient(httpClient, testSettings);
            var v3Index            = new V3IndexClient(httpClient, testSettings);
            var v2v3Search         = new V2V3SearchClient(httpClient, v3Index, testSettings);
            var flatContainer      = new FlatContainerClient(httpClient, v3Index);
            var registration       = new RegistrationClient(httpClient, v3Index);
            var nuGetExe           = new NuGetExeClient(testSettings, gallery);
            var symbolServerClient = new SymbolServerClient(testSettings);

            return(new Clients(
                       gallery,
                       v3Index,
                       v2v3Search,
                       flatContainer,
                       registration,
                       nuGetExe,
                       symbolServerClient));
        }