/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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/.
*/
namespace SafeExamBrowser.Communication.Contracts.Proxies
{
///
/// Defines the result of a communication between an and its .
///
public class CommunicationResult
{
///
/// Defines whether the communication was successful or not.
///
public bool Success { get; protected set; }
public CommunicationResult(bool success)
{
Success = success;
}
}
///
/// Defines the result of a communication between an and its .
///
/// The type of the expected response value.
public class CommunicationResult : CommunicationResult
{
///
/// The response value. Can be null or default(T) in case the communication has failed!
///
public T Value { get; protected set; }
public CommunicationResult(bool success, T value) : base(success)
{
Value = value;
}
}
}