Exemplo n.º 1
0
        public CdeGroup Get(string groupId)
        {
            if (!groups.TryGetValue(groupId, out var group))
            {
                group = new CdeGroup();
                groups.Add(groupId, group);
            }

            return(group);
        }
Exemplo n.º 2
0
        private void Publish(CdeGroup group)
        {
            var groupUpdate = new GroupUpdate
            {
                Uri  = group.GroupInfo.ID.Uri,
                Name = group.GroupInfo.Name,

                Members = group.MemberInfos.Select(memberInfo => new GroupMemberUpdate
                {
                    Uri       = memberInfo.Identity.Uri,
                    Name      = memberInfo.Identity.Name,
                    Number    = memberInfo.Identity.PhoneNumber,
                    Available = memberInfo.Status != CdePresenceStatus.Available,
                }),
            };

            mediator.Publish(groupUpdate);
        }