Mark van Renswoude
b980e308d1
Added ExceptionStrategy Removed PublishExchange, fixed default ExchangeStrategy
26 lines
831 B
C#
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() };
|
|
}
|
|
}
|
|
}
|