SPDocumentSharingManager.GetRoleDefinitionIdFromWeb method

Gets the role definition ID from the web that is associated with a given Role enum value.

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

Syntax

'Declaration
Public Shared Function GetRoleDefinitionIdFromWeb ( _
    web As SPWeb, _
    role As Role _
) As Integer
'Usage
Dim web As SPWeb
Dim role As Role
Dim returnValue As Integer

returnValue = SPDocumentSharingManager.GetRoleDefinitionIdFromWeb(web, _
    role)
public static int GetRoleDefinitionIdFromWeb(
    SPWeb web,
    Role role
)

Parameters

Return value

Type: System.Int32
The ID of the associated SPRoleDefinition object, or null if it cannot be found.

See also

Reference

SPDocumentSharingManager class

SPDocumentSharingManager members

Microsoft.SharePoint.Sharing namespace