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
)
参数
- 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,DOCUMENTThe 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.