Beispiel #1
0
        public async Task <bool> ConnectAsync(string host, AuthenticationStrategy authenticationStrategy)
        {
            if (host == null)
            {
                throw new ArgumentNullException("host");
            }

            if (authenticationStrategy == null)
            {
                throw new ArgumentNullException("authenticationStrategy");
            }

            this.authenticationStrategy = authenticationStrategy;
            this.Host = host.TrimEnd('/');

            return(await authenticationStrategy.ConnectAsync(this.Host).ConfigureAwait(AwaitContinueOnCapturedContext));
        }