public override IHttpClientAbstraction Create(string token, HDInsight.IAbstractionContext context, bool ignoreSslErrors) { var loc = this.AsyncMock; if (loc.IsNotNull()) { return(new HttpAbstractionSimulatorClient(this, this.underlying.Create(token, context, ignoreSslErrors), loc)); } else { return(new HttpAbstractionSimulatorClient(this, this.underlying.Create(token, context, ignoreSslErrors), null)); } }
internal HDInsightManagementRestClient(IHDInsightSubscriptionCredentials credentials, HDInsight.IAbstractionContext context, bool ignoreSslErrors) { this.context = context; this.credentials = credentials; this.ignoreSslErrors = ignoreSslErrors; if (context.Logger.IsNotNull()) { this.Logger = context.Logger; } else { this.Logger = new Logger(); } }
public HDInsightManagementRestSimulatorClient(IHDInsightSubscriptionCredentials credentials, HDInsight.IAbstractionContext context) { this.context = context; var cert = new X509Certificate2(IntegrationTestBase.TestCredentials.Certificate); this.certificates.Add(cert.Thumbprint, cert); this.subscriptions.Add(IntegrationTestBase.TestCredentials.SubscriptionId); this.credentials = credentials; this.Logger = new Logger(); }
internal SubscriptionRegistrationClient(IHDInsightSubscriptionCredentials credentials, HDInsight.IAbstractionContext context, bool ignoreSslErrors) { this.context = context; this.credentials = credentials; this.ignoreSslErrors = ignoreSslErrors; }
public HDInsightJobSubmissionRestClient(IHDInsightSubscriptionCredentials credentials, HDInsight.IAbstractionContext context, bool ignoreSslErrors) { this.context = context; this.credentials = credentials; this.ignoreSslErrors = ignoreSslErrors; }
/// <inheritdoc /> public IHttpClientAbstraction Create(HDInsight.IAbstractionContext context, bool ignoreSslErrors) { return(ServiceLocator.Instance.Locate <IHttpClientAbstractionFactory>() .Create(context, ignoreSslErrors)); }
/// <inheritdoc /> public IHttpClientAbstraction Create(IHDInsightSubscriptionCredentials credentials, HDInsight.IAbstractionContext context, bool ignoreSslErrors) { IHDInsightCertificateCredential certCreds = credentials as IHDInsightCertificateCredential; IHDInsightAccessTokenCredential tokenCreds = credentials as IHDInsightAccessTokenCredential; if (certCreds != null) { return (ServiceLocator.Instance.Locate <IHttpClientAbstractionFactory>() .Create(certCreds.Certificate, context, ignoreSslErrors)); } if (tokenCreds != null) { return (ServiceLocator.Instance.Locate <IHttpClientAbstractionFactory>() .Create(tokenCreds.AccessToken, context, ignoreSslErrors)); } throw new NotSupportedException("Credential Type is not supported"); }