1
0
mirror of synced 2024-07-01 00:07:39 +00:00
Tapeti/Tapeti.Flow/FlowMessageContextPayload.cs
Mark van Renswoude be576a2409 Implemented #31: Include message details in exception logging (optionally)
Refactored IControllerMessageContext into context payloads to get access to it in the exception handler
2021-09-02 16:16:44 +02:00

34 lines
912 B
C#

using System;
using Tapeti.Config;
using Tapeti.Flow.Default;
namespace Tapeti.Flow
{
/// <summary>
/// Contains information about the flow for the current message. For internal use.
/// </summary>
internal class FlowMessageContextPayload : IMessageContextPayload, IDisposable
{
public FlowContext FlowContext { get; }
/// <summary>
/// Indicates if the current message handler is the last one to be called before a
/// parallel flow is done and the convergeMethod will be called.
/// Temporarily disables storing the flow state.
/// </summary>
public bool FlowIsConverging { get; set; }
public FlowMessageContextPayload(FlowContext flowContext)
{
FlowContext = flowContext;
}
public void Dispose()
{
FlowContext?.Dispose();
}
}
}