Метод Web.GetObjectSharingSettings
Given a path to an object in SharePoint, this will generate a sharing settings object which contains necessary information for rendering sharing information.
Пространство имен: Microsoft.SharePoint.Client
Сборки: Microsoft.SharePoint.Client.Silverlight (в Microsoft.SharePoint.Client.Silverlight.dll); Microsoft.SharePoint.Client.Phone (в Microsoft.SharePoint.Client.Phone.dll) Microsoft.SharePoint.Client (в Microsoft.SharePoint.Client.dll)
Синтаксис
'Декларация
Public Shared Function GetObjectSharingSettings ( _
context As ClientRuntimeContext, _
objectUrl As String, _
groupId As Integer, _
useSimplifiedRoles As Boolean _
) As ObjectSharingSettings
'Применение
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
)
Параметры
- context
Тип: Microsoft.SharePoint.Client.ClientRuntimeContext
- objectUrl
Тип: 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
Тип: System.Int32The id value of the permissions group if adding to a group, 0 otherwise.
useSimplifiedRoles
Тип: System.BooleanBoolean value indicating whether to use the SharePoint simplified roles (Edit, View).
Возвращаемое значение
Тип: Microsoft.SharePoint.Client.ObjectSharingSettings
A ObjectSharingSettings object.