コード例 #1
0
        /// <summary>
        /// 查询用户的即时消息地址
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public UserIMAddressCollection QueryUsersIMAddress(params string[] ids)
        {
            UserInfoExtendCollection extendedInfo = QueryUsersExtendedInfo(ids);

            UserIMAddressCollection result = new UserIMAddressCollection();

            extendedInfo.ForEach(eu => result.Add(new UserIMAddress(eu.ID, eu.IMAddress)));

            return(result);
        }
コード例 #2
0
        public UserIMAddressCollection QueryUsersIMAddress(params string[] ids)
        {
            //新实现,从权限中心获取用户SIP地址
            OguObjectCollection <IUser> users = OguMechanismFactory.GetMechanism().GetObjects <IUser>(SearchOUIDType.Guid, ids);

            UserIMAddressCollection result = new UserIMAddressCollection();

            foreach (IUser user in users)
            {
                if (result.ContainsKey(user.ID) == false)
                {
                    UserIMAddress item = new UserIMAddress(
                        user.ID,
                        DictionaryHelper.GetValue(user.Properties, "Sip", string.Empty));

                    result.Add(item);
                }
            }

            return(result);
        }