Beispiel #1
0
        private void SetUser(Direction direction, AppUser user)
        {
            RequestBrokers.Remove(RequestBrokers.FirstOrDefault(x => x.Direction == direction));

            RequestBrokers.Add(new SendReceiveBroker()
            {
                Direction = direction,
                User      = user,
                UserId    = user.Id
            });


            var targetBroker = GetUser(direction);

            targetBroker.User   = user;
            targetBroker.UserId = user.Id;
        }
Beispiel #2
0
 private SendReceiveBroker GetUser(Direction direction)
 {
     return(RequestBrokers.FirstOrDefault(x => x.Direction == direction));
 }