SPChangeQuery.Restore property

Gets or sets a Boolean value that specifies whether changes that restore items from the Recycle Bin or from a backup are included in the query.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Property Restore As Boolean
    Get
    Set
'Usage
Dim instance As SPChangeQuery
Dim value As Boolean

value = instance.Restore

instance.Restore = value
public bool Restore { get; set; }

Property value

Type: System.Boolean
true to include changes that restore items; otherwise, false. The default is false.

Remarks

You can limit the results of the query to restore operations on particular objects by setting the corresponding object properties to true. For example, the following code constructs a query for changes that add, delete, move, or restore files and folders.

' Construct a query.
Dim query As New SPChangeQuery(False, False)

' object types 
query.File = True
query.Folder = True

' change types 
query.Add = True
query.Delete = True
query.Move = True
query.Restore = True
// Construct a query.
SPChangeQuery query = new SPChangeQuery(false, false); 

// object types 
query.File = true;
query.Folder = true;

// change types 
query.Add = true;
query.Delete = true;
query.Move = true;
query.Restore = true;

See also

Reference

SPChangeQuery class

SPChangeQuery members

Microsoft.SharePoint namespace