Condividi tramite


WebPartPermission Constructor

NOTE: This API is now obsolete.

Initializes a new instance of the WebPartPermission class.

Namespace:  Microsoft.SharePoint.Security
Assembly:  Microsoft.SharePoint.Security (in Microsoft.SharePoint.Security.dll)

Syntax

'Declaration
<ObsoleteAttribute("Web Part permissions are obsolete and no longer required")> _
Public Sub New ( _
    state As PermissionState _
)
'Usage
Dim state As PermissionState

Dim instance As New WebPartPermission(state)
[ObsoleteAttribute("Web Part permissions are obsolete and no longer required")]
public WebPartPermission(
    PermissionState state
)

Parameters

Remarks

The constructor creates permissions with either fully restricted (None) or Unrestricted access to Web Part resources.

Exceptions

Exception Type

Condition

ArgumentException

The state parameter is not a System.Security.Permissions.PermissionState value.

See Also

Reference

WebPartPermission Class

WebPartPermission Members

Microsoft.SharePoint.Security Namespace