Beispiel #1
0
        public RChatViewModel(IStorage <MessageViewModel> storage) : base()
        {
            Title = "NBS群聊";
            initSelf();
            BindingOperations.EnableCollectionSynchronization(_collection, _lockObject);
            PubSubTask.PubSubTaskClient cli = new PubSubTask.PubSubTaskClient(GrpcBaseHelper.Instance().Channel);
            serviceClient = new PubSubServiceClient <MessageViewModel>(cli, _collection, SELF, SELF.UID, true);
            StartRecving();

            this.AssignCommands();

            loadLocalHistory(storage, 1);
        }
Beispiel #2
0
 public SubscriberBase(string[] channels)
 {
     Client = new PubSubServiceClient(new InstanceContext(this));
     Client.Subscribe(channels);
 }