示例#1
0
 protected RestWrapper(IAuthenticationHandler authenticationHandler, IHeaderHandlerFactory headerHandlers, TypeWrapper interfaceType)
 {
     this.authenticationHandler = authenticationHandler;
     this.headerHandlers        = headerHandlers.GetHandlers();
     this.interfaceType         = interfaceType.Type;
     InitializeClient(this.interfaceType);
 }
示例#2
0
 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>();
 }
示例#3
0
 public TestClient(IAuthenticationHandler authenticationHandler, IHeaderHandlerFactory headerHandlers, TypeWrapper interfaceType)
     : base(authenticationHandler, headerHandlers, interfaceType)
 {
 }