ColleagueManager.Create Method
Creates a Colleague object with the specified type and privacy level.
Namespace: Microsoft.Office.Server.UserProfiles
Assembly: Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)
Syntax
'Declaration
Public Function Create ( _
colleague As UserProfile, _
colleagueGroupType As ColleagueGroupType, _
strGroup As String, _
isInWorkgroup As Boolean, _
privacyLevel As Privacy _
) As Colleague
'Usage
Dim instance As ColleagueManager
Dim colleague As UserProfile
Dim colleagueGroupType As ColleagueGroupType
Dim strGroup As String
Dim isInWorkgroup As Boolean
Dim privacyLevel As Privacy
Dim returnValue As Colleague
returnValue = instance.Create(colleague, _
colleagueGroupType, strGroup, isInWorkgroup, _
privacyLevel)
public Colleague Create(
UserProfile colleague,
ColleagueGroupType colleagueGroupType,
string strGroup,
bool isInWorkgroup,
Privacy privacyLevel
)
Parameters
colleague
Type: Microsoft.Office.Server.UserProfiles.UserProfileThe UserProfile object of the colleague.
colleagueGroupType
Type: Microsoft.Office.Server.UserProfiles.ColleagueGroupTypeOne of the following: Peer, UserSpecified, or General.
strGroup
Type: System.StringThe name of the group the colleague should be under.
isInWorkgroup
Type: System.BooleanDetermines whether the colleague should be part of a work group.
privacyLevel
Type: Microsoft.Office.Server.UserProfiles.PrivacyThe privacy level of the colleague.
Return Value
Type: Microsoft.Office.Server.UserProfiles.Colleague
A newly created Colleague object.