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
web
Type: Microsoft.SharePoint.SPWebThe SPWeb object from which to obtain the role definition ID.
role
Type: Microsoft.SharePoint.Sharing.RoleThe Role enum value for which to obtain the associated role definition ID.
Return value
Type: System.Int32
The ID of the associated SPRoleDefinition object, or null if it cannot be found.
See also
Reference
SPDocumentSharingManager class