2017-07-21 10:04:27 +02:00
|
|
|
|
/*
|
2022-01-21 16:33:52 +01:00
|
|
|
|
* Copyright (c) 2022 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/.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-08-30 09:55:26 +02:00
|
|
|
|
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
|
2017-07-21 10:04:27 +02:00
|
|
|
|
|
2019-08-30 09:55:26 +02:00
|
|
|
|
namespace SafeExamBrowser.Core.Contracts.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-10-03 14:35:27 +02:00
|
|
|
|
/// Event fired when the operation requires user interaction.
|
2017-07-21 10:04:27 +02:00
|
|
|
|
/// </summary>
|
2018-10-03 14:35:27 +02:00
|
|
|
|
event ActionRequiredEventHandler ActionRequired;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the status of the operation has changed.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event StatusChangedEventHandler StatusChanged;
|
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>
|
2018-10-10 09:19:03 +02:00
|
|
|
|
/// Reverts all changes made when executing the operation.
|
2018-02-01 08:37:12 +01:00
|
|
|
|
/// </summary>
|
2018-10-10 09:19:03 +02:00
|
|
|
|
OperationResult Revert();
|
2017-07-21 10:04:27 +02:00
|
|
|
|
}
|
|
|
|
|
}
|