/// <summary> /// Creates a session pool that caches sessions and can refresh them. /// </summary> /// <returns>Session pool.</returns> public static ISessionPool Create() { IConfigProvider config = ConfigFactory.CreateForSoap(); var sessionPool = new SessionPool(new SoapAuth(new SoapServiceFactory(config)), DefaultSessionPoolSize); Task.Run(() => sessionPool.PopulateAsync()); return(sessionPool); }