다음을 통해 공유


PrivacyPolicyManager.CreatePrivacyPolicy Method

NOTE: This API is now obsolete.

Creates a privacy policy.

Namespace:  Microsoft.Office.Server.UserProfiles
Assembly:  Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)

Syntax

'Declaration
<ObsoleteAttribute("This method is no longer supported.")> _
Public Function CreatePrivacyPolicy ( _
    displayName As String, _
    group As String, _
    policy As PrivacyPolicy, _
    defaultPrivacy As Privacy, _
    canUserOverridePrivacy As Boolean _
) As PrivacyPolicyItem
'Usage
Dim instance As PrivacyPolicyManager
Dim displayName As String
Dim group As String
Dim policy As PrivacyPolicy
Dim defaultPrivacy As Privacy
Dim canUserOverridePrivacy As Boolean
Dim returnValue As PrivacyPolicyItem

returnValue = instance.CreatePrivacyPolicy(displayName, _
    group, policy, defaultPrivacy, canUserOverridePrivacy)
[ObsoleteAttribute("This method is no longer supported.")]
public PrivacyPolicyItem CreatePrivacyPolicy(
    string displayName,
    string group,
    PrivacyPolicy policy,
    Privacy defaultPrivacy,
    bool canUserOverridePrivacy
)

Parameters

  • displayName
    Type: System.String

    The display name for the new privacy policy.

  • group
    Type: System.String

    The group that the new privacy policy belongs to.

  • canUserOverridePrivacy
    Type: System.Boolean

    Sets whether a user can override the privacy policy.

Return Value

Type: Microsoft.Office.Server.UserProfiles.PrivacyPolicyItem
The PrivacyItem object.

Remarks

For more information about privacy policies, see Privacy Policies and Writing Policy-Compliant Code. For a code example about how to set the privacy policy of a property, see How to: Set Privacy Policies for User Profile Properties.

See Also

Reference

PrivacyPolicyManager Class

PrivacyPolicyManager Members

Microsoft.Office.Server.UserProfiles Namespace