Пример #1
0
        public Client(ISwiftAuthManager authManager)
        {
            if (authManager.Authenticate == null)
            {
                authManager.Authenticate = Authenticate;
            }

            _manager = new SwiftRetryManager(authManager);
        }
Пример #2
0
        public Client(ISwiftAuthManager authManager, TimeSpan?timeout = null) : this(timeout)
        {
            if (authManager.Authenticate == null)
            {
                authManager.Authenticate = Authenticate;
            }

            RetryManager = new SwiftRetryManager(authManager);
        }
Пример #3
0
        /// <summary>
        /// Set credentials (username, password, list of proxy endpoints)
        /// </summary>
        /// <param name="credentials"></param>
        /// <returns></returns>
        public Client WithCredentials(SwiftCredentials credentials)
        {
            if (RetryManager == null)
            {
                var authManager = new SwiftAuthManager(credentials);

                authManager.Authenticate = Authenticate;

                authManager.Credentials = credentials;

                RetryManager = new SwiftRetryManager(authManager);
            }

            return(this);
        }