private IStreamApiConnector GetApiConnector(ConnectionInfo info)
 {
     var host = WebUtil.GetValidAbsoluteUriString(info.Host);
     var connector = StreamApiConnectorFactory.NewInstance();
     connector.Init(host, Settings.Default.StreamAPIVersion, StreamApiEndpoint.InternalApi);
     connector.UserAgent = new UserAgent();
     return connector;
 }
 /// <summary>
 /// Creates AtTaskLoginException _instance with connection details used while trying to log in
 /// and inner exception which occured during log in.
 /// </summary>
 /// <param name="connectionInfo"></param>
 /// <param name="exception"></param>
 public AtTaskAuthenticationException(ConnectionInfo connectionInfo, Exception exception)
     : base(exception)
 {
     this.connectionInfo = connectionInfo;
 }