You need to add code to line MP57 to display the required properties for the user profile
How should you complete the relevant code?
(To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content)
Select and Place:
Correct Answer:
Explanation/Reference:
public UserProfilePropertiesForUser(ClientRuntimeContext context, string accountName, string[] propertyNames)
// Connect to the client context.
ClientContext clientContext = new ClientContext(serverUrl);
// Get the PeopleManager object.
PeopleManager peopleManager = new PeopleManager(clientContext);
// Retrieve specific properties by using the GetUserProfilePropertiesFor method.
// The returned collection contains only property values.
string[] profilePropertyNames = new string[] { "PreferredName", "Department", "Title" };
UserProfilePropertiesForUser profilePropertiesForUser = new UserProfilePropertiesForUser(clientContext, targetUser, profilePropertyNames);
IEnumerable<string> profilePropertyValues = peopleManager.GetUserProfilePropertiesFor(profilePropertiesForUser);
// Load the request and run it on the server.
clientContext.Load(profilePropertiesForUser);
clientContext.ExecuteQuery();
http://msdn.microsoft.com/en-us/library/jj163182.aspx
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.userprofiles.userprofilepropertiesforuser.aspx