Share via


WebPartPermissionAttribute.CreatePermission Method

NOTE: This API is now obsolete.

Creates and returns a new WebPartPermission object.

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 Overrides Function CreatePermission As IPermission
'Usage
Dim instance As WebPartPermissionAttribute
Dim returnValue As IPermission

returnValue = instance.CreatePermission()
[ObsoleteAttribute("Web Part permissions are obsolete and no longer required")]
public override IPermission CreatePermission()

Return Value

Type: System.Security.IPermission
System.Security.IPermission A WebPartPermission that corresponds to this attribute.

Remarks

This method should be called only by the security system, never by application code.

At compile time, attributes convert security declarations to a serialized form in metadata. Declarative security data in metadata is created from the permission that this method returns that corresponds to this attribute.

See Also

Reference

WebPartPermissionAttribute Class

WebPartPermissionAttribute Members

Microsoft.SharePoint.Security Namespace