private IBus ConfigureNServiceBus() { var configuration = new BusConfiguration(); configuration.AssembliesToScan(AllAssemblies.Except("MediaLoanLIbrary.Fines.Common")); configuration.EndpointName("IntegrationTesting"); configuration.DisableFeature <Sagas>(); configuration.DisableFeature <TimeoutManager>(); configuration.DisableFeature <AutoSubscribe>(); configuration.DisableFeature <InMemorySubscriptionPersistence>(); configuration.DisableFeature <StorageDrivenPublishing>(); configuration.UsePersistence <InMemoryPersistence>(); configuration.PurgeOnStartup(true); configuration.Conventions() .DefiningCommandsAs(type => UnobtrusiveMessageConventions.CommandsDefinition(type) || (UnobtrusiveMessageConventions.EventsDefinition(type) && type.Namespace.Contains(".Loans."))) .DefiningEventsAs(type => UnobtrusiveMessageConventions.EventsDefinition(type) && !type.Namespace.Contains(".Loans.")); configuration.EnableInstallers(); return(Bus.Create(configuration).Start()); }
private bool ExecuteEventsDefinitionOnType(Type type) { return(UnobtrusiveMessageConventions.EventsDefinition(type)); }