Which code segment should you insert at line 10?

You are creating a Microsoft Office SharePoint Server 2007 site. You create a Microsoft WinForms application to enter information about a user.

You write the following code segment. (Line numbers are included for reference only.)

01 static void AddUser (string[] user_name )
02 {
03 using (SPSite site =
04 new SPSite(“http://sitename”))
05 {
06 ServerContext context =
07 ServerContext.GetContext(site);
08 UserProfileManager profileManager =
09 new UserProfileManager(context);
10 …

11 }
12 }

You need to add a user profile to the profile store.

Which code segment should you insert at line 10?

You are creating a Microsoft Office SharePoint Server 2007 site. You create a Microsoft WinForms application to enter information about a user.

You write the following code segment. (Line numbers are included for reference only.)

01 static void AddUser (string[] user_name )
02 {
03 using (SPSite site =
04 new SPSite(“http://sitename”))
05 {
06 ServerContext context =
07 ServerContext.GetContext(site);
08 UserProfileManager profileManager =
09 new UserProfileManager(context);
10 …

11 }
12 }

You need to add a user profile to the profile store.

Which code segment should you insert at line 10?

A.
UserProfile u = profileManager.GetUserProfile(user_name);

B.
UserProfileManager profileManager =
new UserProfileManager(context);
UserProfile u = profileManager.GetUserProfile(user_name);

C.
Commit ();

D.
string user_name = “<UserProfile>”;

user_name += userProfile + user_name;

user_name += “</UserProfile>”;
profileManager.CreateUserProfile ( user_name );

E.
UserProfile u = profileManager.CreateUserProfile(user_name);

F.
Commit ();



Leave a Reply 0

Your email address will not be published. Required fields are marked *