1
0
mirror of synced 2024-11-04 18:49:16 +00:00
Tapeti/Tapeti.Flow/FlowMiddleware.cs
Mark van Renswoude b980e308d1 Added request/response validation for non-yieldpoint methods
Added ExceptionStrategy
Removed PublishExchange, fixed default ExchangeStrategy
2017-02-07 16:13:33 +01:00

26 lines
831 B
C#

using System.Collections.Generic;
using Tapeti.Config;
using Tapeti.Flow.Default;
namespace Tapeti.Flow
{
public class FlowMiddleware : IMiddlewareBundle
{
public IEnumerable<object> GetContents(IDependencyResolver dependencyResolver)
{
var container = dependencyResolver as IDependencyContainer;
// ReSharper disable once InvertIf
if (container != null)
{
container.RegisterDefault<IFlowProvider, FlowProvider>();
container.RegisterDefault<IFlowHandler, FlowProvider>();
container.RegisterDefault<IFlowRepository, NonPersistentFlowRepository>();
container.RegisterDefault<IFlowStore, FlowStore>();
}
return new[] { new FlowBindingMiddleware() };
}
}
}