SPDocumentSharingManager.GetRoleDefinitionFromWeb method
Gets the role definition 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 GetRoleDefinitionFromWeb ( _
web As SPWeb, _
role As Role _
) As SPRoleDefinition
'Usage
Dim web As SPWeb
Dim role As Role
Dim returnValue As SPRoleDefinition
returnValue = SPDocumentSharingManager.GetRoleDefinitionFromWeb(web, _
role)
public static SPRoleDefinition GetRoleDefinitionFromWeb(
SPWeb web,
Role role
)
Parameters
web
Type: Microsoft.SharePoint.SPWebThe SPWeb object from which to obtain the role definitions.
role
Type: Microsoft.SharePoint.Sharing.RoleThe Role enum value for which to obtain the associated role definition.
Return value
Type: Microsoft.SharePoint.SPRoleDefinition
The associated SPRoleDefinition object, or null if it cannot be found.
See also
Reference
SPDocumentSharingManager class