Метод Web.CreateAnonymousLinkWithExpiration
Create an anonymous link which can be used to access a document without needing to authenticate.
Пространство имен: 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 CreateAnonymousLinkWithExpiration ( _
context As ClientRuntimeContext, _
url As String, _
isEditLink As Boolean, _
expirationString As String _
) As ClientResult(Of String)
'Применение
Dim context As ClientRuntimeContext
Dim url As String
Dim isEditLink As Boolean
Dim expirationString As String
Dim returnValue As ClientResult(Of String)
returnValue = Web.CreateAnonymousLinkWithExpiration(context, _
url, isEditLink, expirationString)
public static ClientResult<string> CreateAnonymousLinkWithExpiration(
ClientRuntimeContext context,
string url,
bool isEditLink,
string expirationString
)
Параметры
- context
Тип: Microsoft.SharePoint.Client.ClientRuntimeContext
url
Тип: System.StringThe URL of the document in SharePoint.
isEditLink
Тип: System.BooleanIf true, the link will allow the guest user edit privileges on the item.
expirationString
Тип: System.StringA date/time string that conforms to the ISO 8601:2004(E) complete representation for calendar date and time of day and which represents the time and date of expiry for the anonymous link. Both the minutes and hour value must be specified for the difference between the local and UTC time. Midnight is represented as 00:00:00. For example:
YYYYMMDDThhmmssZ
YYYYMMDDThhmmss±hhmm
YYYYMMDDThhmmss±hh:mm
YYYY-MM-DDThh:mm:ssZ
YYYY-MM-DDThh:mm:ss±hh:mm
YYYY-MM-DDThh:mm:ss±hhmm
A null value indicates no expiry.
Возвращаемое значение
Тип: Microsoft.SharePoint.Client.ClientResult<String>
The string for the anonymous link.
Замечания
For more information, see External sharing API for SharePoint and OneDrive for Business.