1
0
mirror of synced 2024-11-16 14:53:50 +00:00
Tapeti/Config/IBindingContext.cs

42 lines
950 B
C#
Raw Normal View History

2016-12-11 14:08:58 +00:00
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading.Tasks;
2016-12-11 14:08:58 +00:00
namespace Tapeti.Config
{
public delegate object ValueFactory(IMessageContext context);
public delegate Task ResultHandler(IMessageContext context, object value);
2016-12-11 14:08:58 +00:00
public interface IBindingContext
{
Type MessageClass { get; set; }
MethodInfo Method { get; }
2016-12-11 14:08:58 +00:00
IReadOnlyList<IBindingParameter> Parameters { get; }
IBindingResult Result { get; }
void Use(IBindingFilter filter);
void Use(IMessageMiddleware middleware);
2016-12-11 14:08:58 +00:00
}
public interface IBindingParameter
{
ParameterInfo Info { get; }
bool HasBinding { get; }
void SetBinding(ValueFactory valueFactory);
}
public interface IBindingResult
{
ParameterInfo Info { get; }
bool HasHandler { get; }
void SetHandler(ResultHandler resultHandler);
}
2016-12-11 14:08:58 +00:00
}