Пример #1
0
        /// <summary>
        /// Requests a user's profile.
        /// </summary>
        /// <param name="accountName">The name of the user for whom to request information.</param>
        /// <param name="profile">The profile request, which should contain the keys to request.</param>
        public virtual void RequestUserProfile(string accountName, UserProfileRequest profile)
        {
            BncsPacket pck = new BncsPacket((byte)BncsPacketId.ReadUserData);

            pck.InsertInt32(1);
            pck.InsertInt32(profile.Count);
            int currentRequest = Interlocked.Increment(ref m_currentProfileRequestID);

            pck.InsertInt32(currentRequest);
            pck.InsertCString(accountName);
            foreach (UserProfileKey key in profile)
            {
                pck.InsertCString(key.Key);
            }

            m_profileRequests.Add(currentRequest, profile);

            Send(pck);
        }
Пример #2
0
        /// <summary>
        /// Creates a new <see>UserProfileEventArgs</see> with the specified profile.
        /// </summary>
        /// <param name="filledProfile">The profile that had been populated.</param>
        public UserProfileEventArgs(UserProfileRequest filledProfile)
        {
            Debug.Assert(!object.ReferenceEquals(filledProfile, null));

            m_profile = filledProfile;
        }