1
0
mirror of synced 2024-11-16 14:53:50 +00:00
Tapeti/Test/Program.cs
Mark van Renswoude 1a0d9b2570 Added AppSettings ConnectionParams helper
Changed BindingFilters to MessageFilterMiddleware (in preparation for SignalR interaction package)
Start of SqlConnectionFlowRepository
2017-02-08 15:52:24 +01:00

45 lines
1.4 KiB
C#

using System;
using SimpleInjector;
using Tapeti;
using Tapeti.Flow;
using Tapeti.Flow.SQL;
using Tapeti.SimpleInjector;
namespace Test
{
internal class Program
{
private static void Main()
{
// TODO SQL based flow store
// TODO logging
// TODO uitzoeken of we consumers kunnen pauzeren (denk: SQL down) --> nee, EFDBContext Get Async maken en retryen? kan dat, of timeout dan Rabbit?
var container = new Container();
container.Register<MarcoEmitter>();
container.Register<Visualizer>();
//container.Register<IFlowRepository>(() => new EF(serviceID));
var config = new TapetiConfig(new SimpleInjectorDependencyResolver(container))
.WithFlow()
//.WithFlowSqlRepository("data source=localhost;initial catalog=lef;integrated security=True;multipleactiveresultsets=True", 1)
.RegisterAllControllers()
.Build();
using (var connection = new TapetiConnection(config)
{
Params = new TapetiAppSettingsConnectionParams()
})
{
Console.WriteLine("Subscribing...");
connection.Subscribe().Wait();
Console.WriteLine("Done!");
var emitter = container.GetInstance<MarcoEmitter>();
emitter.Run().Wait();
}
}
}
}