Web.GetObjectSharingSettings - Méthode
Given a path to an object in SharePoint, this will generate a sharing settings object which contains necessary information for rendering sharing information.
Espace de noms : Microsoft.SharePoint.Client
Assemblys : Microsoft.SharePoint.Client.Silverlight (dans Microsoft.SharePoint.Client.Silverlight.dll); Microsoft.SharePoint.Client.Phone (dans Microsoft.SharePoint.Client.Phone.dll) Microsoft.SharePoint.Client (dans Microsoft.SharePoint.Client.dll)
Syntaxe
'Déclaration
Public Shared Function GetObjectSharingSettings ( _
context As ClientRuntimeContext, _
objectUrl As String, _
groupId As Integer, _
useSimplifiedRoles As Boolean _
) As ObjectSharingSettings
'Utilisation
Dim context As ClientRuntimeContext
Dim objectUrl As String
Dim groupId As Integer
Dim useSimplifiedRoles As Boolean
Dim returnValue As ObjectSharingSettings
returnValue = Web.GetObjectSharingSettings(context, _
objectUrl, groupId, useSimplifiedRoles)
public static ObjectSharingSettings GetObjectSharingSettings(
ClientRuntimeContext context,
string objectUrl,
int groupId,
bool useSimplifiedRoles
)
Paramètres
- context
Type : Microsoft.SharePoint.Client.ClientRuntimeContext
- objectUrl
Type : System.StringThe URL of the site, with the path of the object in SharePoint represented as query string parameters, forSharing set to 1 if sharing, and mbypass set to 1 to bypass any mobile logic. For example:
https://contoso.com/?forSharing=1&mbypass=1&List=%7BCF908473%2D72D4%2D449D%2D8A53%2D4BD01EC54B84%7D&obj={CF908473-72D4-449D-8A53-4BD01EC54B84},1,DOCUMENT
The URL of the SharePoint object (web, list, item) intended for sharing. For example:
https://contoso.com/Documents/SampleFile.docx
groupId
Type : System.Int32The id value of the permissions group if adding to a group, 0 otherwise.
useSimplifiedRoles
Type : System.BooleanBoolean value indicating whether to use the SharePoint simplified roles (Edit, View).
Valeur renvoyée
Type : Microsoft.SharePoint.Client.ObjectSharingSettings
A ObjectSharingSettings object.