Example #1
0
 public byte AddInvitedFriend(stInvitedFriend friend, bool persist = true)
 {
     if (!this.m_InvitedFriendDic.ContainsKey(friend.uulUid))
     {
         try
         {
             this.m_InvitedFriendDic.Add(friend.uulUid, friend);
             if (persist)
             {
                 this.WriteInvitedFriendDicToBinFile();
             }
             byte b      = 1;
             byte result = b;
             return(result);
         }
         catch (Exception)
         {
             byte b2     = 0;
             byte result = b2;
             return(result);
         }
         return(0);
     }
     return(0);
 }
Example #2
0
        public stInvitedFriend GetInvitedFriendByUid(ulong uulUid)
        {
            if (!this.m_IsInited)
            {
                this.InitLoginData();
            }
            if (!this.m_IsLocalDataInited)
            {
                this.InitLocalData();
            }
            stInvitedFriend result = default(stInvitedFriend);

            if (this.m_InvitedFriendDic.ContainsKey(uulUid))
            {
                this.m_InvitedFriendDic.TryGetValue(uulUid, ref result);
            }
            return(result);
        }
Example #3
0
        public stInvitedFriend GetInvitedFriendByUid(ulong uulUid)
        {
            if (!this.m_IsInited)
            {
                this.InitLoginData();
            }
            if (!this.m_IsLocalDataInited)
            {
                this.InitLocalData();
            }
            stInvitedFriend friend = new stInvitedFriend();

            if (this.m_InvitedFriendDic.ContainsKey(uulUid))
            {
                this.m_InvitedFriendDic.TryGetValue(uulUid, out friend);
            }
            return(friend);
        }
Example #4
0
 public byte AddInvitedFriend(stInvitedFriend friend, bool persist = true)
 {
     if (!this.m_InvitedFriendDic.ContainsKey(friend.uulUid))
     {
         try
         {
             this.m_InvitedFriendDic.Add(friend.uulUid, friend);
             if (persist)
             {
                 this.WriteInvitedFriendDicToBinFile();
             }
             return(1);
         }
         catch (Exception)
         {
             return(0);
         }
     }
     return(0);
 }