Exemple #1
0
        public static UserProxy GetUserProxy(User user)
        {
            if (user == null)
            {
                return null;
            }

            UserProxy userproxy = new UserProxy();
            ConvertUserProxy(userproxy, user);

            return userproxy;
        }
Exemple #2
0
 private static void ConvertUserProxy( UserProxy userproxy,User user)
 {
     userproxy.UserID = user.UserID;
     userproxy.Username = user.Username;
     userproxy.Email = user.Email;
     userproxy.AvatarSrc = user.AvatarSrc;
     userproxy.AvatarUrl_120px = user.BigAvatarPath;
     userproxy.AvatarUrl_48px = user.AvatarPath;
     userproxy.AvatarUrl_24px = user.SmallAvatarPath;
     userproxy.Realname = user.Realname;
     userproxy.MobilePhone = user.MobilePhone;
     userproxy.Gender = (byte)user.Gender;
     userproxy.Birthdat = user.Birthday;
 }
Exemple #3
0
 private static void ConvertUserProxy(UserProxy userproxy, User user)
 {
     userproxy.UserID = user.UserID;
     userproxy.Username = user.Username;
     userproxy.Email = user.Email;
     userproxy.AvatarSrc = user.AvatarSrc;
     userproxy.AvatarUrl_120px = user.BigAvatarPath;
     userproxy.AvatarUrl_48px = user.AvatarPath;
     userproxy.AvatarUrl_24px = user.SmallAvatarPath;
     userproxy.Realname = user.Realname;
     userproxy.MobilePhone = user.MobilePhone;
     userproxy.Gender = (byte)user.Gender;
     userproxy.Birthdat = user.Birthday;
     userproxy.Points = new int[user.ExtendedPoints.Length];
     for (int i = 0; i < user.ExtendedPoints.Length; i++)
     {
         userproxy.Points[i] = user.ExtendedPoints[i];
     }
 }