예제 #1
0
        private string DumpFriendListString(List <RailFriendInfo> list)
        {
            StringBuilder stringBuilder = new StringBuilder();

            using (List <RailFriendInfo> .Enumerator enumerator = list.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    RailFriendInfo current = enumerator.Current;
                    stringBuilder.AppendLine(string.Format("friend_id: {0}, type: {1}, online: {2}, playing: {3}", (object)(ulong)((RailComparableID)current.friend_rail_id).id_, (object)(EnumRailFriendType)current.friend_type, (object)((RailFriendOnLineState)current.online_state).friend_online_state.ToString(), (object)(uint)((RailFriendOnLineState)current.online_state).game_define_game_playing_state));
                }
            }
            return(stringBuilder.ToString());
        }
예제 #2
0
        private void AsyncGetFriendsInfo()
        {
            IRailFriends irailFriends = rail_api.RailFactory().RailFriends();

            if (irailFriends == null)
            {
                return;
            }
            List <RailFriendInfo> railFriendInfoList = new List <RailFriendInfo>();

            irailFriends.GetFriendsList(railFriendInfoList);
            List <RailID> railIdList = new List <RailID>();

            using (List <RailFriendInfo> .Enumerator enumerator = railFriendInfoList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    RailFriendInfo current = enumerator.Current;
                    railIdList.Add((RailID)current.friend_rail_id);
                }
            }
            irailFriends.AsyncGetPersonalInfo(railIdList, "");
        }