public SlackRtmClient(ISlackApiClient client, IWebSocketFactory webSocketFactory, SlackJsonSettings jsonSettings, IScheduler scheduler, ILogger logger) { _client = client; _jsonSettings = jsonSettings; _webSocket = new ReconnectingWebSocket(webSocketFactory, scheduler, logger, 0); _rawEvents = DeserializeEvents(_webSocket, _jsonSettings); }
public SlackApiClient(IHttp http, ISlackUrlBuilder urlBuilder, SlackJsonSettings jsonSettings, string token) { _http = http; _urlBuilder = urlBuilder; _jsonSettings = jsonSettings; _token = token; }
public SlackRtmClient(string token) { _jsonSettings = Default.JsonSettings(Default.SlackTypeResolver(Default.AssembliesContainingSlackTypes)); _client = new SlackApiClient(Default.Http(_jsonSettings), Default.UrlBuilder(_jsonSettings), _jsonSettings, token); _webSocket = new ReconnectingWebSocket(Default.WebSocketFactory, Scheduler.Default, Default.Logger, 0); _rawEvents = DeserializeEvents(_webSocket, _jsonSettings); }
public SlackApiClient(string token) { _jsonSettings = Default.JsonSettings(Default.SlackTypeResolver(Default.AssembliesContainingSlackTypes)); _http = Default.Http(_jsonSettings); _urlBuilder = Default.UrlBuilder(_jsonSettings); _token = token; }
public SlackRtmClient(string token) { _rawEvents = Subject.Synchronize(_eventSubject); _webSocketFactory = Default.WebSocketFactory; _jsonSettings = Default.JsonSettings(Default.SlackTypeResolver(Default.AssembliesContainingSlackTypes)); _scheduler = Scheduler.Default; _client = new SlackApiClient(Default.Http(_jsonSettings), Default.UrlBuilder(_jsonSettings), _jsonSettings, token); }
public SlackRtmClient(ISlackApiClient client, IWebSocketFactory webSocketFactory, SlackJsonSettings jsonSettings, IScheduler scheduler) { _rawEvents = Subject.Synchronize(_eventSubject); _client = client; _webSocketFactory = webSocketFactory; _jsonSettings = jsonSettings; _scheduler = scheduler; }
public SlackSocketModeClient( ICoreSocketModeClient socket, SlackJsonSettings jsonSettings, ISlackRequestListener requestListener, ISlackHandlerFactory handlerFactory) { _socket = socket; _jsonSettings = jsonSettings; _requestListener = requestListener; _handlerFactory = handlerFactory; _requestSubscription = _socket.Messages .OfType <SocketEnvelope>() .SelectMany(HandleRequest) .Subscribe(); }
public SlackSocketModeClient( ICoreSocketModeClient socket, SlackJsonSettings jsonSettings, IEnumerable <ISlackRequestListener> requestListeners, ISlackHandlerFactory handlerFactory, ILogger logger) { _socket = socket; _jsonSettings = jsonSettings; _requestListeners = requestListeners; _handlerFactory = handlerFactory; _log = logger.ForSource <SlackSocketModeClient>(); _requestSubscription = _socket.Messages .OfType <SocketEnvelope>() .SelectMany(HandleRequest) .Subscribe(); }
private static IObservable <Event> DeserializeEvents(ReconnectingWebSocket webSocket, SlackJsonSettings jsonSettings) => webSocket.Messages .Select(m => JsonConvert.DeserializeObject <Event>(m.Message, jsonSettings.SerializerSettings)) .Publish() .RefCount();
public Http(Func <HttpClient> getHttpClient, SlackJsonSettings jsonSettings, ILogger logger) { _getHttpClient = getHttpClient; _jsonSettings = jsonSettings; _log = logger.ForSource <Http>(); }
public Http(HttpClient client, SlackJsonSettings jsonSettings) { _client = client; _jsonSettings = jsonSettings; }
public SlackUrlBuilder(SlackJsonSettings jsonSettings) => _jsonSettings = jsonSettings;
public static IHttp Http(SlackJsonSettings jsonSettings = null, HttpClient httpClient = null) => new Http(httpClient ?? new HttpClient(), jsonSettings ?? JsonSettings());
public static ISlackUrlBuilder UrlBuilder(SlackJsonSettings jsonSettings = null) => new SlackUrlBuilder(jsonSettings ?? JsonSettings());
public static IHttp Http(SlackJsonSettings jsonSettings = null, Func <HttpClient> getHttpClient = null) => new Http(getHttpClient ?? HttpClientFactory(), jsonSettings ?? JsonSettings());
public Http(Func <HttpClient> getHttpClient, SlackJsonSettings jsonSettings) { _getHttpClient = getHttpClient; _jsonSettings = jsonSettings; }
public static IHttp Http(SlackJsonSettings jsonSettings) => new Http(new HttpClient(), jsonSettings);
public static ISlackUrlBuilder UrlBuilder(SlackJsonSettings jsonSettings) => new SlackUrlBuilder(jsonSettings);
public Http(HttpClient client, SlackJsonSettings jsonSettings, bool retryOnRateLimit = true) { _client = client; _jsonSettings = jsonSettings; _retryOnRateLimit = retryOnRateLimit; }