 | TaskSchedulerSnapshotRestore Method (TaskServiceConnectionToken, ICollectionSnapshotItem, Boolean, Boolean, IDictionaryString, String, CancellationToken, IProgressTupleInt32, String) |
Register a list of snapshot items (tasks and folders) into the specified Task Scheduler.
Namespace:
Microsoft.Win32.TaskScheduler
Assembly:
Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntaxpublic Task Restore(
TaskServiceConnectionToken tsToken,
ICollection<SnapshotItem> items,
bool applyAccessRights,
bool overwriteExisting,
IDictionary<string, string> passwords,
CancellationToken cancelToken,
IProgress<Tuple<int, string>> progress
)
Public Function Restore (
tsToken As TaskServiceConnectionToken,
items As ICollection(Of SnapshotItem),
applyAccessRights As Boolean,
overwriteExisting As Boolean,
passwords As IDictionary(Of String, String),
cancelToken As CancellationToken,
progress As IProgress(Of Tuple(Of Integer, String))
) As Task
public:
Task^ Restore(
TaskServiceConnectionToken tsToken,
ICollection<SnapshotItem^>^ items,
bool applyAccessRights,
bool overwriteExisting,
IDictionary<String^, String^>^ passwords,
CancellationToken cancelToken,
IProgress<Tuple<int, String^>^>^ progress
)
Request Example
View SourceParameters
- tsToken
- Type: Microsoft.Win32.TaskSchedulerTaskServiceConnectionToken
The TaskServiceConnectionToken into which the tasks and folders are registered. - items
- Type: System.Collections.GenericICollectionSnapshotItem
The list of SnapshotItem instances representing the tasks and folders from this snapshot that should be registered on the
TaskService instance.
- applyAccessRights
- Type: SystemBoolean
If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders.
- overwriteExisting
- Type: SystemBoolean
If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item.
- passwords
- Type: System.Collections.GenericIDictionaryString, String
Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password.
- cancelToken
- Type: System.ThreadingCancellationToken
A cancellation token to use to cancel this asynchronous operation. - progress
- Type: SystemIProgressTupleInt32, String
An optional IProgressT instance to use to report progress of the asynchronous operation.
Return Value
Type:
TaskAn asynchronous
Task instance.
See Also