protected RestWrapper(IAuthenticationHandler authenticationHandler, IHeaderHandlerFactory headerHandlers, TypeWrapper interfaceType) { this.authenticationHandler = authenticationHandler; this.headerHandlers = headerHandlers.GetHandlers(); this.interfaceType = interfaceType.Type; InitializeClient(this.interfaceType); }
protected RestWrapper( IAuthenticationHandler authenticationHandler, IHeaderHandlerFactory headerHandlers, TypeWrapper interfaceType, IServiceProvider serviceLocator) { this.authenticationHandler = authenticationHandler; this._serviceLocator = serviceLocator; this.headerHandlers = headerHandlers?.GetHandlers(this._serviceLocator) ?? (IEnumerable <IHeaderHandler>) new List <IHeaderHandler>(); this.interfaceType = interfaceType.Type; this.InitializeClient(this.interfaceType); this.cookieContainer = this._serviceLocator.GetService <CookieContainer>() ?? new CookieContainer(); this._logger = serviceLocator.GetService <ILogger>(); }
public TestClient(IAuthenticationHandler authenticationHandler, IHeaderHandlerFactory headerHandlers, TypeWrapper interfaceType) : base(authenticationHandler, headerHandlers, interfaceType) { }