/// <summary> /// Removes Client authenticator /// </summary> public void RemoveClientAuthenticator(IClientAuthenticator handler) { List <IClientAuthenticator> list = _authenticators.ToList(); list.Remove(handler); _authenticators = list.ToArray(); }
/// <summary> /// Adds Client authenticator /// </summary> public void AddClientAuthenticator(IClientAuthenticator handler) { List <IClientAuthenticator> list = _authenticators.ToList(); list.Add(handler); _authenticators = list.ToArray(); }
/// <summary> /// Creates new Messaging Queue Server /// </summary> public MqServer(MqServerOptions options, IClientAuthenticator authenticator = null, IClientAuthorization authorization = null) { Options = options ?? new MqServerOptions(); Authenticator = authenticator; Authorization = authorization; _channels = new SafeList <Channel>(256); _clients = new SafeList <MqClient>(2048); InitInstances(); }
/// <summary> /// Creates new Messaging Queue Server /// </summary> public MqServer(MqServerOptions options, IClientAuthenticator authenticator = null, IClientAuthorization authorization = null) { Options = options ?? new MqServerOptions(); Authenticator = authenticator; Authorization = authorization; _channels = new SafeList <Channel>(256); _clients = new SafeList <MqClient>(2048); NodeServer = new NodeServer(this); NodeServer.Initialize(); }
public SiteConnector(HttpClient client, IClientAuthenticator clientAuthenticator, ISiteConnectorSettings settings, List <IHttpStatusCodeStrategy> handlers, ILog logger) { _client = client ?? throw new ArgumentNullException(TheHttpClientMayNotBeNull); _clientAuthenticator = clientAuthenticator ?? throw new ArgumentNullException(nameof(clientAuthenticator)); _settings = settings ?? throw new ArgumentNullException(nameof(settings)); if (!handlers.Any()) { throw new ArgumentException(nameof(handlers)); } _handlers = handlers; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <summary> /// Adds client authenticator implementation to builder /// </summary> public void AddAuthenticator <T>(params object[] ctorArgs) where T : class, IClientAuthenticator, new() { IClientAuthenticator authenticator = Activator.CreateInstance(typeof(T), ctorArgs) as IClientAuthenticator; _clientAuthenticator = authenticator; }
/// <summary> /// Adds client authenticator implementation to builder /// </summary> public void AddAuthenticator <T>() where T : class, IClientAuthenticator, new() { _clientAuthenticator = new T(); }
/// <summary> /// Adds client authenticator implementation to builder /// </summary> public void AddAuthenticator(IClientAuthenticator authenticator) { _clientAuthenticator = authenticator; }
/// <summary> /// Creates new Messaging Queue Server /// </summary> public MqServer(IClientAuthenticator authenticator = null, IClientAuthorization authorization = null) : this(null, authenticator, authorization) { }
/// <summary> /// Uses client authentication /// </summary> public static HorseMqBuilder AddClientAuthenticator(this HorseMqBuilder builder, IClientAuthenticator authenticator) { builder.Server.AddClientAuthenticator(authenticator); return(builder); }