protected void with(Action <JasperBusRegistry> configuration) { var registry = new JasperBusRegistry(); configuration(registry); with(registry); }
protected void with(JasperBusRegistry registry) { registry.Services.Scan(_ => { _.TheCallingAssembly(); _.WithDefaultConventions(); }); Runtime = JasperRuntime.For(registry); Graph = Runtime.Container.GetInstance <HandlerGraph>(); }
public override void SetUp() { _registry = new JasperBusRegistry(); _registry.Services.AddService <ITransport, StubTransport>(); _registry.Services.ForConcreteType <MessageTracker>().Configure.Singleton(); _registry.Services.ForConcreteType <MessageHistory>().Configure.Singleton(); _registry.Services.AddService <IBusLogger, MessageTrackingLogger>(); _registry.Services.For <LightningQueueSettings>().Use(new LightningQueueSettings { MaxDatabases = 20 }); _registry.Logging.LogBusEventsWith(new StorytellerBusLogger(Context)); }
public override void SetUp() { _transport = new StubTransport(); _tracker = new AttemptTracker(); var registry = new JasperBusRegistry(); registry.ListenForMessagesFrom("stub://1".ToUri()); registry.Services.AddService <ITransport>(_transport); registry.Services.AddService(_tracker); registry.SendMessage <ErrorCausingMessage>() .To("stub://1".ToUri()); _runtime = JasperRuntime.For(registry); _graph = _runtime.Container.GetInstance <HandlerGraph>(); _chain = _graph.ChainFor <ErrorCausingMessage>(); _bus = _runtime.Container.GetInstance <IServiceBus>(); }
public override void SetUp() { _registry = new JasperBusRegistry(); _registry.Services.ForConcreteType <MessageTracker>().Configure.Singleton(); }