using System.Reflection;
using Tapeti.Config;
namespace Tapeti.Flow.Default
{
///
///
/// Default implementation for IFlowHandlerContext
///
internal class FlowHandlerContext : IFlowHandlerContext
{
///
///
public FlowHandlerContext()
{
}
///
///
public FlowHandlerContext(IMessageContext source)
{
if (source == null)
return;
if (!source.TryGet(out var controllerPayload))
return;
Config = source.Config;
Controller = controllerPayload.Controller;
Method = controllerPayload.Binding.Method;
MessageContext = source;
}
///
public void Dispose()
{
}
///
public ITapetiConfig Config { get; set; }
///
public object Controller { get; set; }
///
public MethodInfo Method { get; set; }
///
public IMessageContext MessageContext { get; set; }
}
}