2016-12-11 14:08:58 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Tapeti.Config
|
|
|
|
|
{
|
|
|
|
|
public interface IConfig
|
|
|
|
|
{
|
|
|
|
|
string Exchange { get; }
|
|
|
|
|
IDependencyResolver DependencyResolver { get; }
|
|
|
|
|
IReadOnlyList<IMessageMiddleware> MessageMiddleware { get; }
|
|
|
|
|
IEnumerable<IQueue> Queues { get; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public interface IQueue
|
|
|
|
|
{
|
|
|
|
|
bool Dynamic { get; }
|
|
|
|
|
string Name { get; }
|
|
|
|
|
|
|
|
|
|
IEnumerable<IBinding> Bindings { get; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public interface IBinding
|
|
|
|
|
{
|
|
|
|
|
Type Controller { get; }
|
|
|
|
|
MethodInfo Method { get; }
|
|
|
|
|
Type MessageClass { get; }
|
|
|
|
|
|
2016-12-14 19:28:17 +00:00
|
|
|
|
IReadOnlyList<IMessageMiddleware> MessageMiddleware { get; }
|
|
|
|
|
|
2016-12-11 14:08:58 +00:00
|
|
|
|
bool Accept(object message);
|
|
|
|
|
Task<object> Invoke(IMessageContext context, object message);
|
|
|
|
|
}
|
|
|
|
|
}
|