public EventsHandler( IKeybindEvents events, IWhisperService whisperService, INativeClipboard clipboard, INativeKeyboard keyboard, ILogger logger, ITradeSearchService tradeSearchService, IWikiProvider wikiProvider, IViewLocator viewLocator, IChatService chatService, IStashService stashService, SidekickSettings settings, IParserService parserService) { this.events = events; this.whisperService = whisperService; this.clipboard = clipboard; this.keyboard = keyboard; this.logger = logger.ForContext(GetType()); this.tradeSearchService = tradeSearchService; this.logger = logger.ForContext(GetType()); this.wikiProvider = wikiProvider; this.viewLocator = viewLocator; this.chatService = chatService; this.stashService = stashService; this.settings = settings; this.parserService = parserService; Initialize(); }
public WhisperController(IWhisperRepository whisperRepository, IWhisperService whisperService, IHttpContextAccessor httpContext , IHubContext <SingalrClient, ISingalrClient> hubContext) { _whisperRepository = whisperRepository; _whisperService = whisperService; _httpContext = httpContext; }
public TransportClient( string vaspId, string privateTransportKey, IWhisperService whisperRpc, IVaspCodesService vaspCodesService, IOutboundEnvelopeService outboundEnvelopeService, ILoggerFactory loggerFactory) { _vaspId = vaspId; _privateTransportKey = privateTransportKey; _whisperRpc = whisperRpc; _vaspCodesService = vaspCodesService; _outboundEnvelopeService = outboundEnvelopeService; _connections = new ConcurrentDictionary <string, Connection>(); _openVaspPayloads = new ConcurrentDictionary <string, OpenVaspPayloadBase>(); _activeTopics = new HashSet <string>(); _logger = loggerFactory?.CreateLogger <TransportClient>(); _outboundEnvelopeService.OutboundEnvelopeReachedMaxResends += OnOutboundEnvelopeReachedMaxResends; _timer = new Timer(5 * 100); _timer.Elapsed += async delegate { await TimerOnElapsed(); }; StartAsync().GetAwaiter().GetResult(); }
public OutboundEnvelopeService( IWhisperService whisperRpc, double envelopeExpiryInSeconds, int messageRetries, ILoggerFactory loggerFactory) { _whisperRpc = whisperRpc; _envelopeExpiryInSeconds = envelopeExpiryInSeconds; _messageRetries = messageRetries; _timers = new ConcurrentDictionary <string, Timer>(); _logger = loggerFactory?.CreateLogger <OutboundEnvelopeService>(); }
public static void Initialize(IServiceProvider serviceProvider) { Settings = serviceProvider.GetService <SidekickSettings>(); Logger = serviceProvider.GetService <ILogger>(); TradeClient = serviceProvider.GetService <ITradeClient>(); LanguageProvider = serviceProvider.GetService <ILanguageProvider>(); ItemParser = serviceProvider.GetService <IItemParser>(); UILanguageProvider = serviceProvider.GetService <IUILanguageProvider>(); PoeNinjaCache = serviceProvider.GetService <IPoeNinjaCache>(); PoeDbClient = serviceProvider.GetService <IPoeDbClient>(); PoePriceInfoClient = serviceProvider.GetService <IPoePriceInfoClient>(); PoeWikiClient = serviceProvider.GetService <IPoeWikiClient>(); KeybindEvents = serviceProvider.GetService <IKeybindEvents>(); NativeProcess = serviceProvider.GetService <INativeProcess>(); NativeKeyboard = serviceProvider.GetService <INativeKeyboard>(); NativeClipboard = serviceProvider.GetService <INativeClipboard>(); NativeBrowser = serviceProvider.GetService <INativeBrowser>(); ViewLocator = serviceProvider.GetService <IViewLocator>(); WhisperService = serviceProvider.GetService <IWhisperService>(); }
public WhisperController(IWhisperService whisperService, IHttpContextAccessor httpContextAccessor, ICacheFactory cacheFactory) { _whisperService = whisperService; _httpContext = httpContextAccessor; }