コード例 #1
0
ファイル: ProxyConverter.cs プロジェクト: huchao007/bbsmax
        public static UnreadNotifiesProxy GetUnreadNotifiesProxy(UnreadNotifies unreadnotifies)
        {
            if (unreadnotifies == null)
                return null;
            UnreadNotifiesProxy proxy = new UnreadNotifiesProxy();
            proxy.Count = unreadnotifies.Count;
            proxy.UserID = unreadnotifies.UserID;
            proxy.Items = new List<UnreadNotifyItemProxy>();

            foreach (UnreadNotifyItem item in unreadnotifies.Items)
            {
                UnreadNotifyItemProxy proxyItem = new UnreadNotifyItemProxy();
                proxyItem.TypeID = item.TypeID;
                proxyItem.Count = item.UnreadCount;
                proxy.Items.Add(proxyItem);
            }

            return proxy;
        }