Beispiel #1
0
        private void _Leave(Chatter chatter)
        {
            var whispeableChatter = _Chatters.Items.FirstOrDefault(i => i.Name == chatter.Messager.Name);

            if (whispeableChatter != null)
            {
                _Chatters.Items.Remove(whispeableChatter);
            }
        }
Beispiel #2
0
        void IBootable.Launch()
        {
            _This    = _Binder.Bind <IPlayer>(this);
            _Chatter = _Room.RegistChatter(this);
            _Chatters.Items.Clear();

            _Room.Chatters.Supply   += _Add;
            _Room.Chatters.Unsupply += _Leave;
        }
Beispiel #3
0
        internal Chatter RegistChatter(IMessageable messageable)
        {
            var chatter = new Chatter(messageable, (msg) => _Broadcast(msg, messageable));

            lock (_Chatters)
            {
                _Chatters.Add(chatter);
            }

            return(chatter);
        }
Beispiel #4
0
        private void _Add(Chatter chatter)
        {
            var whispeableChatter = new WhispeableChatter(_Chatter, chatter);

            _Chatters.Items.Add(whispeableChatter);
        }
Beispiel #5
0
 internal void UnregistChatter(Chatter chatter)
 {
     lock (_Chatters)
         _Chatters.Remove(chatter);
 }
Beispiel #6
0
 public WhispeableChatter(Chatter sender, Chatter chatter)
 {
     this._Sender   = sender;
     this._Receiver = chatter;
 }