Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Restores the document set metadata and items versions to the specified snapshot.
Namespace: Microsoft.Office.DocumentManagement.DocumentSets
Assembly: Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
Syntax
'Declaration
Public Function Restore ( _
label As String _
) As Hashtable
'Usage
Dim instance As DocumentSetVersionCollection
Dim label As String
Dim returnValue As Hashtable
returnValue = instance.Restore(label)
public Hashtable Restore(
string label
)
Parameters
label
Type: System.StringThe snapshot version label to restore the document set to.
Return Value
Type: System.Collections.Hashtable
A System.Collections.Hashtable storing filenames of items that failed to restore as the key and the error message encountered as the corresponding value.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | A document snapshot with label {0} cannot be restored because it does not exist in the parent collection (ArgumentException.ParamName="label") The value cannot be a null reference (Nothing in Visual Basic) or an empty string. |
ArgumentException | A document snapshot with label {0} cannot be restored because it does not exist in the parent collection (ArgumentException.ParamName="label") |
InvalidOperationException | Cannot work with snapshot because versioning is not enabled on the parent list of %1. |
InvalidOperationException | One or more items in the Document Set are currently checked out or are records. All items must be checked-in before a previous version can be restored. Items that have been declared as records cannot be restored. |
See Also
Reference
DocumentSetVersionCollection Class
DocumentSetVersionCollection Members