HoloToolkit.Sharing.Session.GetUser C# (CSharp) Method

GetUser() public method

public GetUser ( int i ) : User
i int
return User
  public virtual User GetUser(int i) {
    global::System.IntPtr cPtr = SharingClientPINVOKE.Session_GetUser(swigCPtr, i);
    User ret = (cPtr == global::System.IntPtr.Zero) ? null : new User(cPtr, true);
    return ret; 
  }

Usage Example

Example #1
0
        public User GetUserById(long userId)
        {
            User retval = null;

            userIdToUser.TryGetValue(userId, out retval);

            if (retval == null)
            {
                Session currentSession = this.sessionManager.GetCurrentSession();
                if (currentSession != null)
                {
                    int userCount = currentSession.GetUserCount();
                    for (int index = 0; index < userCount; index++)
                    {
                        User user = currentSession.GetUser(index);
                        if ((long)user.GetID() == userId)
                        {
                            retval = user;
                            break;
                        }
                    }
                }
            }

            return(retval);
        }
All Usage Examples Of HoloToolkit.Sharing.Session::GetUser