public ConnectionDetailViewModel(ISignalRService signalRService)
        {
            signalRService.Started += SignalRServiceOnStarted;
            signalRService.Stopped += SignalRServiceOnStopped;

            CopyUriCommand = new DelegateCommand(CopyUri);
        }
        public TradeService(IUserService userService)
        {
            _repository = new List <ITrade>();

            for (var i = 0; i < 10; i++)
            {
                var trade = TradeServiceReferential.GenerateTrade();
                _repository.Add(trade);
            }

            var token = userService.Login(new Credentials()
            {
                Username = "******",
                Password = "******"
            }).Result;


            _tradeEventService = SignalRServiceBuilder <TradeEvent, TradeEventRequest>
                                 .Create()
                                 .Build(new TradeEventRequest((p) => true), (opts) =>
            {
                opts.AccessTokenProvider = () => Task.FromResult(token.Digest);
            });

            _tradeEventService.Connect(Scheduler.Default, 1000)
            .Subscribe((tradeEvent) =>
            {
                var trade = _repository.FirstOrDefault(t => t.Id == tradeEvent.TradeId);
                if (null == trade)
                {
                    return;
                }
                trade.Status = tradeEvent.Status;
            });
        }
 public SettlementRepository(CleanArchitectureContext dbContext, ICommonRepository <TradePoolQueue> TradePoolQueue,
                             ICommonRepository <TradeBuyRequest> TradeBuyRequest, ICommonRepository <TradeBuyerList> TradeBuyerList,
                             ICommonRepository <TradeSellerList> TradeSellerList, ICommonRepository <TradePoolMaster> TradePoolMaster,
                             ICommonRepository <PoolOrder> PoolOrder, EFCommonRepository <TransactionQueue> TransactionRepository,
                             EFCommonRepository <TradeTransactionQueue> TradeTransactionRepository, IWalletService WalletService,
                             ISignalRService ISignalRService, IFrontTrnService IFrontTrnService, ICommonRepository <TradeStopLoss> TradeStopLoss, IMediator mediator, IMessageConfiguration messageConfiguration, UserManager <ApplicationUser> userManager)
 {
     _dbContext = dbContext;
     //_logger = logger;
     _TradePoolQueue             = TradePoolQueue;
     _TradeBuyRequest            = TradeBuyRequest;
     _TradeBuyerList             = TradeBuyerList;
     _TradeSellerList            = TradeSellerList;
     _TradePoolMaster            = TradePoolMaster;
     _PoolOrder                  = PoolOrder;
     _TransactionRepository      = TransactionRepository;
     _TradeTransactionRepository = TradeTransactionRepository;
     _WalletService              = WalletService;
     _ISignalRService            = ISignalRService;
     _IFrontTrnService           = IFrontTrnService;
     _TradeStopLoss              = TradeStopLoss;
     _mediator             = mediator;
     _messageConfiguration = messageConfiguration;
     _userManager          = userManager;
 }
 public SpotifyPlayerViewModel(ISpotifyApi spotifyApi, ISignalRService signalRService)
 {
     _spotifyApi     = spotifyApi;
     _signalRService = signalRService;
     Task.Run(() => LoadData());
     LoadCommands();
 }
 public PurchaseOrderItemsApiController(
     IApplicationManager applicationManager,
     ISignalRService signalRService)
     : base(applicationManager)
 {
     this.signalRService = signalRService;
 }
Example #6
0
        //private readonly IWebApiRepository _webApiRepository;
        //private readonly IWebApiSendRequest _webApiSendRequest;
        //private readonly IGetWebRequest _getWebRequest;
        //private readonly WebApiParseResponse _WebApiParseResponse;


        public WalletTransactionCrDr(ICommonRepository <WalletMaster> commonRepository,
                                     ICommonRepository <TrnAcBatch> BatchLogger, ICommonRepository <WalletOrder> walletOrderRepository, IWalletRepository walletRepository,
                                     IGetWebRequest getWebRequest, ICommonRepository <TradeBitGoDelayAddresses> bitgoDelayRepository, ICommonRepository <AddressMaster> addressMaster,
                                     ILogger <BasePage> logger, ICommonRepository <WalletTypeMaster> WalletTypeMasterRepository,
                                     ICommonRepository <WalletAllowTrn> WalletAllowTrnRepo, ICommonRepository <WalletLimitConfiguration> WalletLimitConfig, ICommonRepository <TransactionAccount> TransactionAccountsRepository, ICommonWalletFunction commonWalletFunction,
                                     ICommonRepository <ChargeRuleMaster> chargeRuleMaster, ICommonRepository <LimitRuleMaster> limitRuleMaster, ISignalRService signalRService) : base(logger)
        {
            //_walletService = walletService;
            // _log = log;
            _commonRepository      = commonRepository;
            _walletOrderRepository = walletOrderRepository;
            //_walletRepository = repository;
            //_bitgoDelayRepository = bitgoDelayRepository;
            _trnBatch          = BatchLogger;
            _walletRepository1 = walletRepository;
            //_webApiRepository = webApiRepository;
            //_webApiSendRequest = webApiSendRequest;
            //_thirdPartyCommonRepository = thirdpartyCommonRepo;
            //_getWebRequest = getWebRequest;
            _addressMstRepository       = addressMaster;
            _WalletTypeMasterRepository = WalletTypeMasterRepository;
            //_WalletAllowTrnRepository = WalletAllowTrnRepository;
            //_WebApiParseResponse = WebApiParseResponse;
            //_walletLedgerRepository = walletledgerrepo;
            _WalletAllowTrnRepo = WalletAllowTrnRepo;
            // _walletService = walletService;
            //_LimitcommonRepository = WalletLimitConfig;
            //_BeneficiarycommonRepository = BeneficiaryMasterRepo;
            //_UserPreferencescommonRepository = UserPreferenceRepo;
            _TransactionAccountsRepository = TransactionAccountsRepository;
            _signalRService       = signalRService;
            _commonWalletFunction = commonWalletFunction;
            _chargeRuleMaster     = chargeRuleMaster;
            _limitRuleMaster      = limitRuleMaster;
        }
Example #7
0
        public PricePublisher(IPriceService priceService, PriceServiceConfiguration configuration)
        {
            _rand = new Random();

            _priceService  = priceService;
            _configuration = configuration;

            var accessTokenRetrieverFactory = new AccessTokenRetrieverFactory();

            var tokenRetriever = accessTokenRetrieverFactory.GetToken(
                "internal",
                "idkfa",
                _configuration.Identity,
                AzurePlaygroundConstants.Auth.ClientReferenceToken,
                AzurePlaygroundConstants.Api.Trade,
                _configuration.Key
                );

            _priceHubService = SignalRServiceBuilder <Price, PriceRequest>
                               .Create()
                               .Build(new PriceRequest((p) => true), (opts) =>
            {
                opts.AccessTokenProvider = () => Task.FromResult(tokenRetriever());
            });

            _priceHubService.Connect(Scheduler.Default, 2000);

            _cleanUp = new CompositeDisposable();
        }
Example #8
0
        public StreamFlowDriverSignalR(ISignalRService signalRService)
        {
            SignalRService = signalRService;

            SignalRService.Connection.Reconnected  += async(e) => OnReconnected?.Invoke();
            SignalRService.Connection.Reconnecting += async(e) => OnReconnecting?.Invoke();
            SignalRService.Connection.Closed       += async(e) => OnDisconnected?.Invoke();
        }
 //public SocketController(ILogger<SocketController> logger, IMediator mediator, ISignalRTestService signalRTestService)
 public SocketController(ILogger <SocketController> logger, IMediator mediator, ISignalRService signalRService)
 {
     _logger = logger;
     //_chat = chat;
     _mediator       = mediator;
     _signalRService = signalRService;
     //_signalRTestService = signalRTestService;
 }
Example #10
0
 public FriendshipsController(IFriendshipsService friendships, IUsersService users, IHubContext <NotificationsHub, INotificationsHub> hubContext, ISignalRService signalRService, INotificationsService notifications)
 {
     Friendships    = friendships;
     Users          = users;
     HubContext     = hubContext;
     SignalRService = signalRService;
     Notifications  = notifications;
 }
Example #11
0
 public MainPage()
 {
     signalRService = DependencyService.Get <ISignalRService>();
     signalRService.ConnectAsync();
     signalRService.NewMessageReceived += SignalRService_NewMessageReceived;
     InitializeComponent();
     this.lstView.ItemsSource = ChatList;
 }
        public PlaylistService(
            IGetSongRequestByIdQuery getSongRequestByIdQuery,
            IGetPlaylistStateQuery getPlaylistStateQuery,
            IAddSongRequestCommand addSongRequestCommand,
            IPromoteRequestCommand promoteRequestCommand,
            IArchiveRequestCommand archiveRequestCommand,
            IRemoveAndRefundAllRequestsCommand removeAndRefundAllRequestsCommand,
            IGetCurrentRequestsQuery getCurrentRequestsQuery,
            IIsSuperVipInQueueQuery isSuperVipInQueueQuery,
            IGetUsersFormattedRequestsQuery getUsersFormattedRequestsQuery,
            IUpdatePlaylistStateCommand updatePlaylistStateCommand,
            IAddSongToDriveCommand addSongToDriveCommand,
            IGetMaxRegularRequestCountQuery getMaxRegularRequestCountQuery,
            IEditSuperVipCommand editSuperVipCommand,
            IRemoveSuperVipCommand removeSuperVipCommand,
            IGetUsersCurrentRequestCountsQuery getUsersCurrentRequestCountsQuery,
            IRemoveUsersRequestByPlaylistIndexCommand removeUsersRequestByPlaylistIndexCommand,
            IArchiveUsersSingleRequestCommand archiveUsersSingleRequestCommand,
            IGetSingleSongRequestIdRepository getSingleSongRequestIdRepository,
            IGetUsersRequestAtPlaylistIndexQuery getUsersRequestAtPlaylistIndexQuery,
            IEditRequestCommand editRequestCommand,
            IGetTopTenRequestsQuery getTopTenRequestsQuery,
            ISecretService secretService,
            IConfigService configService,
            ISignalRService signalRService,
            IRefundVipCommand refundVipCommand
            )
        {
            _getSongRequestByIdQuery           = getSongRequestByIdQuery;
            _getPlaylistStateQuery             = getPlaylistStateQuery;
            _addSongRequestCommand             = addSongRequestCommand;
            _promoteRequestCommand             = promoteRequestCommand;
            _archiveRequestCommand             = archiveRequestCommand;
            _removeAndRefundAllRequestsCommand = removeAndRefundAllRequestsCommand;
            _getCurrentRequestsQuery           = getCurrentRequestsQuery;
            _isSuperVipInQueueQuery            = isSuperVipInQueueQuery;
            _getUsersFormattedRequestsQuery    = getUsersFormattedRequestsQuery;
            _updatePlaylistStateCommand        = updatePlaylistStateCommand;
            _addSongToDriveCommand             = addSongToDriveCommand;
            _getMaxRegularRequestCountQuery    = getMaxRegularRequestCountQuery;
            _editSuperVipCommand                      = editSuperVipCommand;
            _removeSuperVipCommand                    = removeSuperVipCommand;
            _getUsersCurrentRequestCountsQuery        = getUsersCurrentRequestCountsQuery;
            _removeUsersRequestByPlaylistIndexCommand = removeUsersRequestByPlaylistIndexCommand;
            _archiveUsersSingleRequestCommand         = archiveUsersSingleRequestCommand;
            _getSingleSongRequestIdRepository         = getSingleSongRequestIdRepository;
            _getUsersRequestAtPlaylistIndexQuery      = getUsersRequestAtPlaylistIndexQuery;
            _editRequestCommand     = editRequestCommand;
            _getTopTenRequestsQuery = getTopTenRequestsQuery;
            _secretService          = secretService;
            _configService          = configService;
            _signalRService         = signalRService;
            _refundVipCommand       = refundVipCommand;

            _concurrentVipSongsToPlay = configService.Get <int>("ConcurrentVipSongsToPlay");

            _rand = new Random();
        }
Example #13
0
        public App()
        {
            InitializeComponent();

            EventAggregator = new EventAggregator();
            SignalRService  = new SignalRService(App.EventAggregator);

            MainPage = new NavigationPage(new MainPage());
        }
 public PlexAccountService(IMediator mediator, IPlexServerService plexServerService, IPlexLibraryService plexLibraryService,
                           IPlexApiService plexApiService, ISignalRService signalRService)
 {
     _mediator           = mediator;
     _plexServerService  = plexServerService;
     _plexLibraryService = plexLibraryService;
     _plexApiService     = plexApiService;
     _signalRService     = signalRService;
 }
Example #15
0
 public HomeController(IUserService userService, IHubContext <ChatHub> hubContext,
                       ISignalRService signalRService, IMessageService messageService, IConfiguration configuration)
 {
     HubContext      = hubContext;
     _signalRService = signalRService;
     _messageService = messageService;
     _configuration  = configuration;
     _userService    = userService;
 }
Example #16
0
 public SendLocationViewModel(
     ISignalRService signalRservice,
     ILocationService locationService
     )
 {
     this.signalRService  = signalRservice;
     this.locationService = locationService;
     StartSendingLocation = new Command(OnStartSendingLocation);
 }
Example #17
0
        public App()
        {
            _presentationService = new PresentationService();
            _signalRService      = new SignalRService();
            GC.KeepAlive(new ChannelBackgroundService(_presentationService, _signalRService));

            // The initial start of the signalR service.  Start/stop will later be invoked by UI control only.
            _signalRService.StartAsync().ConfigureAwait(false);
        }
Example #18
0
 public ChatController(IChatService chat, IMapper mapper, IUsersService users, IFriendshipsService friendships, ISignalRService signalRService, IHubContext <NotificationsHub, INotificationsHub> hubContext)
 {
     Chat           = chat;
     Mapper         = mapper;
     Users          = users;
     Friendships    = friendships;
     HubContext     = hubContext;
     SignalRService = signalRService;
 }
Example #19
0
 public ViewLocationViewModel(
     IEventAggregator eventAggregator,
     ISignalRService signalRService
     )
 {
     this.subscription   = eventAggregator.Subscribe <Location>(OnLocationReceived);
     this.signalRService = signalRService;
     this.signalRService.Connect();
 }
        public ChannelBackgroundService(IPresentationService presentationService, ISignalRService signalRService)
        {
            _presentationService = presentationService;
            _signalRService      = signalRService;

            presentationService.SlideCountChanged    += OnSlideCountChanged;
            presentationService.SlidePositionChanged += OnSlidePositionChanged;

            signalRService.Started += OnConnectionStarted;
        }
Example #21
0
 public OnboardingViewModel(IStateService stateService,
                            IUserService userService,
                            ISignalRService signaRService,
                            INavigationService navigationService,
                            IPageDialogService pageDialogService)
     : base(stateService, userService, signaRService, navigationService)
 {
     PageDialogService = pageDialogService;
     LetsSing          = new DelegateCommand(async() => await LetsSingExecute()).ObservesCanExecute(() => IsNotBusy);
 }
        public SpotifyPlaylistsViewModel(ISpotifyApi spotifyApi, ISignalRService signalRService)
        {
            _spotifyApi     = spotifyApi;
            _signalRService = signalRService;

            Task.Run(() => LoadData());

            PlayTrackCommand      = new CustomCommand(PlayTrack, CanPlayTrack);
            ChangePlaylistCommand = new CustomCommand(ChangePlaylist, CanChangePlaylist);
        }
Example #23
0
 public MessageService(IMessageRepository messageRepository,
                       IChatRepository chatRepository,
                       IIdentityService identityService,
                       ISignalRService signalRService, IRepository <Domain.User, string> userRepository)
 {
     _messageRepository = messageRepository;
     _chatRepository    = chatRepository;
     _identityService   = identityService;
     _signalRService    = signalRService;
     _userRepository    = userRepository;
 }
 public WardenIterationController(IWardenService wardenService, 
     IOrganizationService organizationService,
     IApiKeyService apiKeyService,
     IUserService userService,
     ISignalRService signalRService)
     : base(apiKeyService, userService)
 {
     _wardenService = wardenService;
     _organizationService = organizationService;
     _signalRService = signalRService;
 }
Example #25
0
        public ChannelUsersViewModel(ISignalRService signalRService)
        {
            _signalRService = signalRService;

            signalRService.Started += SignalRServiceOnStarted;
            signalRService.Stopped += SignalRServiceOnStopped;

            ChannelUsers = new ObservableCollection <ChannelUser>();

            ChannelUsers.CollectionChanged += ChannelUsersOnCollectionChanged;
        }
Example #26
0
 public WardenIterationController(IWardenService wardenService,
                                  IOrganizationService organizationService,
                                  IApiKeyService apiKeyService,
                                  IUserService userService,
                                  ISignalRService signalRService)
     : base(apiKeyService, userService)
 {
     _wardenService       = wardenService;
     _organizationService = organizationService;
     _signalRService      = signalRService;
 }
Example #27
0
 public Worker(ISignalRService signalRService, ILogger <Worker> logger, ITestConfiguration testConfiguration)
 {
     _signalRService          = signalRService;
     _connectionNumber        = testConfiguration.SignalRConcurrentConnections;
     _logger                  = logger;
     _hubsConnections         = new List <HubConnection>();
     _lockClientsConnected    = new object();
     _lockClientsReceivedData = new object();
     _lockAddConnection       = new object();
     _testConfiguration       = testConfiguration;
 }
 public PlexLibraryService(
     IMediator mediator,
     IPlexAuthenticationService plexAuthenticationService,
     IPlexApiService plexServiceApi,
     ISignalRService signalRService)
 {
     _mediator = mediator;
     _plexAuthenticationService = plexAuthenticationService;
     _plexServiceApi            = plexServiceApi;
     _signalRService            = signalRService;
 }
Example #29
0
        protected BaseViewModel(IStateService stateService,
                                IUserService userService,
                                ISignalRService signaRService,
                                INavigationService navigationService)
        {
            StateService      = stateService;
            SignalRService    = signaRService;
            UserService       = userService;
            NavigationService = navigationService;

            RegisterSignalREvents();
        }
Example #30
0
 public HRViewModel()
 {
     User = HRView.User;
     RichTextBoxText = "Connected to server at localhost/8090";
     signalRService = new SignalRService();
     signalRService.Connect();
     Students = new ObservableCollection<StudentModel>
     {
         new StudentModel {Age = 20, Id = Guid.NewGuid(), Name = "Ion", Mail = "*****@*****.**"},
         new StudentModel {Age = 23, Id = Guid.NewGuid(), Name = "Vasile", Mail = "*****@*****.**"},
         new StudentModel {Age = 53, Id = Guid.NewGuid(), Name = "Adrian", Mail = "*****@*****.**"}
     };
     NewStudent = new StudentModel();
 }
Example #31
0
        public MainViewModel(IStateService stateService,
                             IUserService userService,
                             ISignalRService signaRService,
                             INavigationService navigationService,
                             IYoutubeSearchService youtubeSearchService,
                             IReactionService reactionService,
                             ISongService songService) :
            base(stateService, userService, signaRService, navigationService)
        {
            YoutubeSearchService = youtubeSearchService;
            ReactionService      = reactionService;
            SongService          = songService;

            SearchYoutube = new DelegateCommand <string>(async(x) => await SearchYoutubeExecute(x));
            NowPlaying    = new DelegateCommand(async() => await NowPlayingExecute());
        }
 public FunctionMediaManager(ILog log,
                             IDataAccessService dataAccessService,
                             ITMDbApiService tMDbApiService,
                             ISignalRService signalRService,
                             IAzureKeyVaultService azureKeyVaultService,
                             IAzureStorageService azureStorageService,
                             IAzureMediaServices azureMediaServices)
 {
     _log = log;
     _dataAccessService    = dataAccessService;
     _tMDbApiService       = tMDbApiService;
     _signalRService       = signalRService;
     _azureKeyVaultService = azureKeyVaultService;
     _azureStorageService  = azureStorageService;
     _azureMediaServices   = azureMediaServices;
 }