Which line of code should you insert at line 6?

You have a web part that contains the following code segment:

01: Using site as New SPSite(“http://internet”)
02: Dim context as ServerContext = ServerContext.GetContext(site)
03: Dim profileManager as New UserProfileManager(context)
04: Dim changeQuery as New UserProfileChangeQuery()
05: changeQuery.ChangeTokenStart = New
UserProfileChangeToken(DateTimeStamp.UTCNow.Subtract(TimeSpan.FromDays(10)))
06: …
07: End Using

You need to retrieve all of the department changes for your colleagues’ profiles for the last 10 days.

Which line of code should you insert at line 6?

You have a web part that contains the following code segment:

01: Using site as New SPSite(“http://internet”)
02: Dim context as ServerContext = ServerContext.GetContext(site)
03: Dim profileManager as New UserProfileManager(context)
04: Dim changeQuery as New UserProfileChangeQuery()
05: changeQuery.ChangeTokenStart = New
UserProfileChangeToken(DateTimeStamp.UTCNow.Subtract(TimeSpan.FromDays(10)))
06: …
07: End Using

You need to retrieve all of the department changes for your colleagues’ profiles for the last 10 days.

Which line of code should you insert at line 6?

A.
Dim changes as UserProfileChangeCollection =
ProfileManager.GetUserProfile(SPContext.Current.Web.CurrentUser.LoginInName).GetChanges(changeQuery)

B.
Dim changes as UserProfileChangeDirectory =
ProfileManager.GetUserProfile(SPContext.Current.Web.CurrentUser.LogInName).GetCommonChanges(change Query)

C.
Dim changesDataSet =
ProfileManager.GetUserProfile(SPContext.Current.Web.CurrentUser.LogInName).Colleagues.GetDataSet()

D.
Dim changes as UserProfileChangeToken
ProfileManager.GetUserProfile(SPContext.Current.Web.CurrentUser.LogInName).CurrentChangeToken()



Leave a Reply 0

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