public QuectelModemPositioningService(IOverkillConfiguration _config, IPubSubService _pubSub, IThreadProxy _threadProxy, ISerialProxy _serialProxy)
 {
     config      = _config;
     pubSub      = _pubSub;
     threadProxy = _threadProxy;
     serialProxy = _serialProxy;
 }
Esempio n. 2
0
 public KubernetesService(
     IAppSettings appSettings,
     IPubSubService pubSubService,
     IEnumerable <IAccountManager> accountManagers)
     : base(appSettings, pubSubService, accountManagers)
 {
 }
Esempio n. 3
0
 public UpdateContactDetailsViewModel(BusinessService businessService, IOperationsManager operationsService, IToastService toastService, IPubSubService pubSubService, IModalService modalService)
 {
     _businessService   = businessService;
     _operationsService = operationsService;
     _toastService      = toastService;
     _pubSubService     = pubSubService;
     _modalService      = modalService;
 }
Esempio n. 4
0
 public LoginViewModel(AccountService accountService, NavigationManager navigationManager, ILogger <LoginViewModel> logger, AuthenticationStateProvider authenticationStateProvider, IPubSubService pubSubService)
 {
     _pubSubService = pubSubService;
     _logger        = logger;
     _authenticationStateProvider = authenticationStateProvider;
     _navigationManager           = navigationManager;
     _accountService = accountService;
     Error           = string.Empty;
 }
Esempio n. 5
0
        protected KubernetesServiceBase(
            IAppSettings appSettings,
            IPubSubService pubSubService,
            IEnumerable <IAccountManager> accountManagers)
        {
            this.appSettings     = appSettings;
            this.pubSubService   = pubSubService;
            this.accountManagers = accountManagers;

            this.ResetClient();
        }
Esempio n. 6
0
        public ClusterMasterViewModel(
            IKubernetesService kubernetesService,
            INavigationService navigationService,
            IPubSubService pubSubService)
        {
            this.kubernetesService = kubernetesService;
            this.navigationService = navigationService;

            pubSubService.SubscribeToResourceListingSettingChanged <IKubernetesService>(
                this,
                this.HandleResourceListingSettingChanged);
        }
        public void ClassInit()
        {
            var orderFactory = new ChannelFactory <IOrderService>("orderSvc");

            _callbackObj = new TestCallbackClass();

            var instanceContext = new InstanceContext(_callbackObj);
            var pubSubFactory   = new DuplexChannelFactory <IPubSubService>(instanceContext, "pubSubEp");

            _orderSvc  = orderFactory.CreateChannel();
            _pubSubSvc = pubSubFactory.CreateChannel();
        }
Esempio n. 8
0
        public ClusterOverviewViewModel(
            IKubernetesService kubernetesService,
            IPopupService popupService,
            IPubSubService pubSubService)
        {
            this.kubernetesService = kubernetesService;
            this.popupService      = popupService;

            // Defaulting this to true in order that we do not display an empty message on first
            // navigating to this page.
            this.IsBusy = true;

            pubSubService.SubscribeToResourceListingSettingChanged <IKubernetesService>(
                this,
                this.HandleResourceListingSettingChanged);

            pubSubService.SubscribeToNamespaceChanged <IKubernetesService>(
                this,
                this.HandleNamespaceChanged);
        }
 public GamepadButtonInputMessageHandler(IServiceProvider serviceProvider)
 {
     pubSub = serviceProvider.GetRequiredService <IPubSubService>();
 }
Esempio n. 10
0
 public GamepadJoystickInputMessageHandler(IServiceProvider serviceProvider)
 {
     pubSub = serviceProvider.GetService <IPubSubService>();
 }
Esempio n. 11
0
        public WebsocketService(IServiceProvider serviceProvider, INetworkingService networkService, IOverkillConfiguration configuration, IPubSubService pubSub)
        {
            _serviceProvider = serviceProvider;
            _networkService  = networkService;
            _config          = configuration;

            messageHandlerCache = new Dictionary <string, IWebsocketMessageHandler>();
            messageTypeCache    = new Dictionary <string, Type>();

            pubSub.Subscribe <PluginWebsocketMessageTopic>(message =>
            {
                SendMessage(new CustomMessage()
                {
                    MessageType = message.MessageType,
                    JSON        = message.JSON
                });
            });
        }
 public UpdateBusinessOfficeViewModel(BusinessService businessService, IModalService modalService, IPubSubService pubSubService)
 {
     _businessService = businessService;
     _modalService    = modalService;
     _pubSubService   = pubSubService;
 }
Esempio n. 13
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IPubSubService broker)
        {
            loggerFactory.AddConsole(LogLevel.Debug);
            loggerFactory.AddDebug(LogLevel.Debug);
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                //app.UseHsts();
            }

            var webSocketOptions = new WebSocketOptions()
            {
                KeepAliveInterval = TimeSpan.FromSeconds(120),
                ReceiveBufferSize = 4 * 1024
            };

            app.UseWebSockets(webSocketOptions);
            app.UseMiddleware <WebSocketMiddleware>(broker);
            app.UseCors(corsPolicy);
            app.UseAuthentication();
            //app.UseHttpsRedirection();
            app.UseMvc();
        }
 public KeyboardInputMessageHandler(IServiceProvider serviceProvider)
 {
     pubSub = serviceProvider.GetService <IPubSubService>();
 }
        public static async Task ProcessWebSocket(HttpContext context, WebSocket webSocket, IPubSubService broker)
        {
            ArraySegment <Byte> buffer = new ArraySegment <byte>(new Byte[1024 * 4]);
            var socketId = Guid.NewGuid();

            var result = await ProcessReceive(webSocket);

            while (!result.Item1.CloseStatus.HasValue)
            {
                if (result.Item2 != string.Empty)
                {
                    var dt = JsonConvert.DeserializeObject <DataTable>(result.Item2);
                    foreach (DataRow dr in dt.Rows)
                    {
                        var action = Convert.ToString(dr[0]);
                        var topic  = Convert.ToString(dr[1]);
                        if (action == "subscribe")
                        {
                            broker.Subscribe(topic, webSocket, socketId);
                        }
                        else
                        {
                            broker.Unsubscribe(topic, socketId);
                        }
                    }
                }

                result = await ProcessReceive(webSocket);

                // TO DO: check time elapse
                // Thread.Sleep(1000);
            }
            await webSocket.CloseAsync(result.Item1.CloseStatus.Value, result.Item1.CloseStatusDescription, CancellationToken.None);
        }
Esempio n. 16
0
 public GamepadTriggerInputMessageHandler(IServiceProvider serviceProvider)
 {
     pubSub = serviceProvider.GetService <IPubSubService>();
 }
Esempio n. 17
0
 public PubSubApi(PubSubService pubSubService)
 {
     _pubSubService = pubSubService;
 }
Esempio n. 18
0
 public AddressFormViewModel(SiteService siteService, IPubSubService pubSubService)
 {
     _siteService        = siteService;
     this._pubSubService = pubSubService;
 }
 public TcpConnectionInterface(IPubSubService _pubSub, IThreadProxy _threadProxy)
 {
     pubSub      = _pubSub;
     threadProxy = _threadProxy;
 }
 public UserCreationSubscriber(IPubSubService pubSubService)
 {
     _pubSubService = pubSubService;
 }
Esempio n. 21
0
 public ContactFormViewModel(SiteService siteService, IPubSubService pubSubService)
 {
     _siteService        = siteService;
     this._pubSubService = pubSubService;
 }
Esempio n. 22
0
 public WebSocketMiddleware(RequestDelegate nextDelegate, IPubSubService broker)
 {
     this._nextDelegate = nextDelegate;
     this._broker       = broker;
 }
Esempio n. 23
0
 public LocomotionMessageHandler(IServiceProvider serviceProvider)
 {
     pubSub = serviceProvider.GetRequiredService <IPubSubService>();
 }
Esempio n. 24
0
 public OperationsService(ILogger <OperationsService> logger, IUserContext userContext, IPubSubService pubSubService, Endpoints endpoints)
 {
     _logger      = logger;
     _userContext = userContext;
     _hubUrl      = endpoints.Push;
     pubSubService.Subscribe <LoginSuccesfulEvent>(LoginSuccesful);
 }