public void DisplayUser(UserProfile profile) { Debug.Assert(profile != null); m_data = new UserDisplayData(); if (profileDisplay != null) { profileDisplay.DisplayProfile(profile); m_data.profile = profileDisplay.data; } else { m_data.profile = UserProfileDisplayData.CreateFromProfile(profile); } if (avatarDisplay != null) { avatarDisplay.DisplayAvatar(profile.id, profile.avatarLocator); m_data.avatar = avatarDisplay.data; } else { if (profile.avatarLocator != null) { m_data.avatar = ImageDisplayData.CreateForUserAvatar(profile.id, profile.avatarLocator); } else { m_data.avatar = new ImageDisplayData(); } } }
public void DisplayUser(UserProfile profile) { Debug.Assert(profile != null); m_data = new UserDisplayData(); if (profileDisplay != null) { profileDisplay.DisplayProfile(profile); m_data.profile = profileDisplay.data; } else { m_data.profile = UserProfileDisplayData.CreateFromProfile(profile); } if (avatarDisplay != null) { avatarDisplay.DisplayAvatar(profile.id, profile.avatarLocator); m_data.avatar = avatarDisplay.data; } else { m_data.avatar = new ImageDisplayData() { userId = profile.id, mediaType = ImageDisplayData.MediaType.UserAvatar, imageId = profile.avatarLocator.fileName, originalTexture = null, thumbnailTexture = null, }; } }