Files
mixtape/zero.Core/Collections/Interceptors/InterceptorResult.cs
T

29 lines
955 B
C#

using System.Collections.Generic;
using zero.Core.Entities;
namespace zero.Core.Collections
{
public class InterceptorResult<T>
{
/// <summary>
/// Autoset. Hash used to match interceptors in order to correctly pass parameters
/// </summary>
internal string InterceptorHash { get; set; }
/// <summary>
/// Prevent further interceptors from running for this operation (only valid for the current interception type, e.g. Update/Created/Purge/...)
/// </summary>
public bool Prevent { get; set; }
/// <summary>
/// Set a result. This will prevent further execution of the operation and cancels all subsequent interceptors
/// </summary>
public EntityResult<T> Result { get; set; }
/// <summary>
/// Additional parameters which can be passed to the interceptor after the operation was completed
/// </summary>
public Dictionary<string, object> Parameters { get; set; } = new();
}
}