コード例 #1
0
        /// <summary>
        /// Occurs when a new user was created.
        /// </summary>
        private void OnUserCreate(User user)
        {
            // Create a request for the avatar
            var request = new AvatarRequest()
            {
                Token = user.Token
            };

            // Publish the request
            Emitter.Publish(Key.AvatarRequest, "avatar-request/v1/", request.Serialize());
        }
コード例 #2
0
 /// <summary>
 /// Occurs when a new user was created.
 /// </summary>
 private void OnUserLeave(User user)
 {
     Emitter.Publish(Key.UserNotify, "user-notify/v1/leave/", user.Serialize());
 }
コード例 #3
0
 /// <summary>
 /// Occurs when a new user was created.
 /// </summary>
 private void OnUserJoin(User user)
 {
     Emitter.Publish(Key.UserNotify, "user-notify/v1/join/", user.Serialize());
 }
コード例 #4
0
 /// <summary>
 /// Updates a user.
 /// </summary>
 private User UpdateUserActivity(string key, User user)
 {
     // Update the last time we've pinged it.
     user.LastPing = DateTime.UtcNow;
     return user;
 }