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); }
public SubscriberBase(string[] channels) { Client = new PubSubServiceClient(new InstanceContext(this)); Client.Subscribe(channels); }