internal AdPostingApiClient(Uri adPostingUri, IOAuth2TokenClient tokenClient, DelegatingHandler customMessageHandler = null) { this._ensureIndexResourceInitialised = new Lazy <Task>(() => this.InitialiseIndexResource(adPostingUri), LazyThreadSafetyMode.ExecutionAndPublication); this._tokenClient = tokenClient; HttpMessageHandler pipeline = new HttpClientHandler() // Add the custom handler as the "last" handler only if it was given .DecorateWith(customMessageHandler, customMessageHandler != null) .DecorateWith(new OAuthMessageHandler(tokenClient)) .DecorateWith(new AdPostingApiMessageHandler()); this._client = new Hal.Client(new HttpClient(pipeline)); }
public OAuthMessageHandler(IOAuth2TokenClient tokenClient) { _tokenClient = tokenClient; }
internal AdPostingApiClient(Uri adPostingUri, IOAuth2TokenClient tokenClient) { this._ensureIndexResourceInitialised = new Lazy<Task>(() => this.InitialiseIndexResource(adPostingUri), LazyThreadSafetyMode.ExecutionAndPublication); this._tokenClient = tokenClient; this._client = new Hal.Client(new HttpClient(new AdPostingApiMessageHandler(new OAuthMessageHandler(tokenClient)))); }
public OAuthMessageHandler(IOAuth2TokenClient tokenClient) : base(new HttpClientHandler()) { _tokenClient = tokenClient; }
internal AdPostingApiClient(Uri adPostingUri, IOAuth2TokenClient tokenClient) { this._ensureIndexResourceInitialised = new Lazy <Task>(() => this.InitialiseIndexResource(adPostingUri), LazyThreadSafetyMode.ExecutionAndPublication); this._tokenClient = tokenClient; this._client = new Hal.Client(new HttpClient(new AdPostingApiMessageHandler(new OAuthMessageHandler(tokenClient)))); }
public AdPostingApiClient(IOAuth2TokenClient tokenClient, Uri adPostingUri, DelegatingHandler customMessageHandler = null) : this(adPostingUri, tokenClient, customMessageHandler) { }
internal LogoPactAdPostingApiClient(Uri adPostingUri, IOAuth2TokenClient tokenClient) : base(adPostingUri, tokenClient) { }