Beispiel #1
0
        /// <summary>
        /// 搜索群
        /// </summary>
        /// <param name="session">用户session</param>
        /// <param name="groupName">群名称</param>
        /// <returns></returns>
        public Stream SearchGroup(string session, string groupName)
        {
            try
            {
                GroupBLL groupBLL = new GroupBLL();
                string   resul    = groupBLL.SearchGroup(session, groupName);

                if (!string.IsNullOrEmpty(resul))
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes(resul)));
                }
                else
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
                }
            }
            catch (Exception err)
            {
                Logger.Error("SearchGroup Error", err);
                return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
            }
        }