public RocketChatRealtimeApi( IEventAggregator eventAggregator, IRocketChatRestApi rocketChatRest, IToastNotificationsService toastService) { this.eventAggregator = eventAggregator; this.eventAggregator.GetEvent <ServerAddressChangedEvent>().Subscribe(ServerAddressChangedHandler); this.rocketChatRest = rocketChatRest; this.toastService = toastService; GetServerAddress(); socket = new MessageWebSocket(); socket.MessageReceived += OnMessageReceived; }
public ChatViewModel( IRocketChatRestApi rocketChatRest, IEventAggregator eventAggregator, IRocketChatRealtimeApi realtimeApi, INavigationService navigationService, IToastNotificationsService notificationService) { this.rocketChatRest = rocketChatRest; this.eventAggregator = eventAggregator; this.realtimeApi = realtimeApi; this.navigationService = navigationService; this.notificationService = notificationService; RegisterCommands(); RegisterSubscriptions(); }
public MainViewModel( IEventAggregator eventAggregator, IRocketChatRestApi rocketChat, INavigationService navigationService, IRocketChatRealtimeApi rocketChatRealtime, IToastNotificationsService toastService ) { this.eventAggregator = eventAggregator; this.rocketChat = rocketChat; this.navigationService = navigationService; this.rocketChatRealtime = rocketChatRealtime; this.toastService = toastService; RegisterCommands(); ButtonsEnabled = true; IsPopupOpened = false; }