Share via


WebPartPermission.IsSubsetOf Method

NOTE: This API is now obsolete.

Determines whether the current permission is a subset of the specified permission.

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 IsSubsetOf ( _
    target As IPermission _
) As Boolean
'Usage
Dim instance As WebPartPermission
Dim target As IPermission
Dim returnValue As Boolean

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

Parameters

  • target
    Type: System.Security.IPermission

    A permission that is to be tested for the subset relationship. This permission must be of the same type as the current permission.

Return Value

Type: System.Boolean
A Boolean value that is true if the current permission is a subset of the specified permission; otherwise, false.

Implements

IPermission.IsSubsetOf(IPermission)

Remarks

The current permission is a subset of the specified permission if the current permission specifies a set of operations that is wholly contained by the specified permission.

Exceptions

Exception Type

Condition

ArgumentException

The target parameter is not a null reference (Nothing in Visual Basic) and is not of the same type as the current permission.

See Also

Reference

WebPartPermission Class

WebPartPermission Members

Microsoft.SharePoint.Security Namespace