다음을 통해 공유


SPRecycleBinItemCollection.RestoreAll Method

Restores all the Recycle Bin items to their original locations.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<ClientCallableExceptionConstraintAttribute(FixedId := "ex2", ErrorCode := , Condition := "Another list with the same name already exists in the original location.",  _
    ErrorType := GetType(SPException))> _
<ClientCallableMethodAttribute(ClientMethodEndCodeSnippet := "EmptyCollectionData();")> _
<ClientCallableExceptionConstraintAttribute(FixedId := "accessdenied", Condition := "Lack of permissions to perform the operation.",  _
    ErrorType := GetType(UnauthorizedAccessException))> _
<ClientCallableExceptionConstraintAttribute(FixedId := "ex1", Condition := "Recycle Bin item does not exist.",  _
    ErrorType := GetType(ArgumentException))> _
<ClientCallableExceptionConstraintAttribute(FixedId := "ex5", ErrorCode := , Condition := "Recycle Bin item has one or more lookup field values that do not exist in the data source that is the target of the lookup field.",  _
    ErrorType := GetType(SPException))> _
<ClientCallableExceptionConstraintAttribute(FixedId := "ex3", ErrorCode := , Condition := "Recycle Bin item contains duplicate field values for a field where Field.EnforceUniqueValues is TRUE.",  _
    ErrorType := GetType(SPException))> _
<ClientCallableExceptionConstraintAttribute(FixedId := "ex4", ErrorCode := , Condition := "Another file or folder with the same name already exists in the original location.",  _
    ErrorType := GetType(SPException))> _
<ClientCallableExceptionConstraintAttribute(FixedId := "thresholdexceeded", ErrorCode := , Condition := "Throttling limit is exceeded by the operation.",  _
    ErrorType := GetType(SPQueryThrottledException))> _
<ClientCallableExceptionConstraintAttribute(FixedId := "ex6", ErrorCode := , Condition := "Recycle Bin item is the child of a list, list item, or document that does not exist.",  _
    ErrorType := GetType(SPException))> _
Public Sub RestoreAll
'Usage
Dim instance As SPRecycleBinItemCollection

instance.RestoreAll()
[ClientCallableExceptionConstraintAttribute(FixedId = "ex2", ErrorCode = , Condition = "Another list with the same name already exists in the original location.", 
    ErrorType = typeof(SPException))]
[ClientCallableMethodAttribute(ClientMethodEndCodeSnippet = "EmptyCollectionData();")]
[ClientCallableExceptionConstraintAttribute(FixedId = "accessdenied", Condition = "Lack of permissions to perform the operation.", 
    ErrorType = typeof(UnauthorizedAccessException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "ex1", Condition = "Recycle Bin item does not exist.", 
    ErrorType = typeof(ArgumentException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "ex5", ErrorCode = , Condition = "Recycle Bin item has one or more lookup field values that do not exist in the data source that is the target of the lookup field.", 
    ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "ex3", ErrorCode = , Condition = "Recycle Bin item contains duplicate field values for a field where Field.EnforceUniqueValues is TRUE.", 
    ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "ex4", ErrorCode = , Condition = "Another file or folder with the same name already exists in the original location.", 
    ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "thresholdexceeded", ErrorCode = , Condition = "Throttling limit is exceeded by the operation.", 
    ErrorType = typeof(SPQueryThrottledException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "ex6", ErrorCode = , Condition = "Recycle Bin item is the child of a list, list item, or document that does not exist.", 
    ErrorType = typeof(SPException))]
public void RestoreAll()

See Also

Reference

SPRecycleBinItemCollection Class

SPRecycleBinItemCollection Members

Microsoft.SharePoint Namespace