HoldSettings.IsOnHold method (String, Boolean, DateTime, IList<HoldInfo>, DateTime)
Checks whether the specified URL is on hold and gets the date that the last hold was added with a list of applicable holds and the last hold updated date.
Namespace: Microsoft.Office.RecordsManagement.Preservation
Assembly: Microsoft.Office.Policy (in Microsoft.Office.Policy.dll)
Syntax
'Declaration
Public Function IsOnHold ( _
serverRelativeUrl As String, _
populateQuery As Boolean, _
<OutAttribute> ByRef lastHoldAddedDate As DateTime, _
<OutAttribute> ByRef applicableHolds As IList(Of HoldInfo), _
<OutAttribute> ByRef lastHoldUpdatedDate As DateTime _
) As Boolean
'Usage
Dim instance As HoldSettings
Dim serverRelativeUrl As String
Dim populateQuery As Boolean
Dim lastHoldAddedDate As DateTime
Dim applicableHolds As IList(Of HoldInfo)
Dim lastHoldUpdatedDate As DateTime
Dim returnValue As Boolean
returnValue = instance.IsOnHold(serverRelativeUrl, _
populateQuery, lastHoldAddedDate, _
applicableHolds, lastHoldUpdatedDate)
public bool IsOnHold(
string serverRelativeUrl,
bool populateQuery,
out DateTime lastHoldAddedDate,
out IList<HoldInfo> applicableHolds,
out DateTime lastHoldUpdatedDate
)
Parameters
serverRelativeUrl
Type: System.StringServer-relative URL of a web.
populateQuery
Type: System.BooleanWhether to populate query in applicable holds.
lastHoldAddedDate
Type: System.DateTimeThe DateTime the last hold is added.
applicableHolds
Type: System.Collections.Generic.IList<HoldInfo>List of applicable holds.
lastHoldUpdatedDate
Type: System.DateTimeThe DateTime the last hold is updated.
Return value
Type: System.Boolean
The date the last hold was added with a list of applicable holds and the date that the last hold was updated.