2017-07-21 10:04:27 +02:00
|
|
|
|
/*
|
2018-01-16 08:24:00 +01:00
|
|
|
|
* Copyright (c) 2018 ETH Zürich, Educational Development and Technology (LET)
|
2017-07-21 10:04:27 +02:00
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
using SafeExamBrowser.Contracts.UserInterface;
|
|
|
|
|
|
2018-03-06 11:49:51 +01:00
|
|
|
|
namespace SafeExamBrowser.Contracts.Behaviour.OperationModel
|
2017-07-21 10:04:27 +02:00
|
|
|
|
{
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Defines an operation which will be executed as part of an <see cref="IOperationSequence"/>.
|
|
|
|
|
/// </summary>
|
2017-07-21 10:04:27 +02:00
|
|
|
|
public interface IOperation
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2018-02-02 09:18:35 +01:00
|
|
|
|
/// The progress indicator to be used to show status information to the user. Will be ignored if <c>null</c>.
|
2017-07-21 10:04:27 +02:00
|
|
|
|
/// </summary>
|
2018-02-02 09:18:35 +01:00
|
|
|
|
IProgressIndicator ProgressIndicator { set; }
|
2017-07-21 10:04:27 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Performs the operation.
|
|
|
|
|
/// </summary>
|
2018-02-28 15:49:06 +01:00
|
|
|
|
OperationResult Perform();
|
2017-07-21 10:04:27 +02:00
|
|
|
|
|
2018-02-01 08:37:12 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Repeats the operation.
|
|
|
|
|
/// </summary>
|
2018-02-28 15:49:06 +01:00
|
|
|
|
OperationResult Repeat();
|
2018-02-01 08:37:12 +01:00
|
|
|
|
|
2017-07-21 10:04:27 +02:00
|
|
|
|
/// <summary>
|
2018-02-28 15:49:06 +01:00
|
|
|
|
/// Reverts all changes which were made when executing the operation.
|
2017-07-21 10:04:27 +02:00
|
|
|
|
/// </summary>
|
|
|
|
|
void Revert();
|
|
|
|
|
}
|
|
|
|
|
}
|