Metamodel for sagas

This pull adds a saga metamodel that paves the way for many of the planned saga features.

The main thing with this pull is that mapped properties are now automatically unique. The inmemory persister is already modified to support this:

https://github.com/Particular/NServiceBus/pull/2416/files#diff-17e8d72500928dcb599bc890835658eeR80

Since the other persisters needs to be modified to look at the metamodel we need to wait until v6 before we can fully complete this. (I'll raise separate issues for those modifications)

I've also killed off  the brittle `with_sagas` tests that are now either covered by real unit tests or acceptance tests.

Next step after this pull is to fix:

https://github.com/Particular/NServiceBus/issues/2080
https://github.com/Particular/NServiceBus/issues/2442
https://github.com/Particular/NServiceBus/issues/313
https://github.com/Particular/NServiceBus/issues/313

which all should be quite a bit easier after this.

I'll rebase after the review is complete
Will do

On Wed, Oct 22, 2014 at 8:28 AM, John Simons <notifications@github.com>
wrote:

> In src/NServiceBus.Core/Sagas/SagaMetaModel.cs:
>
> > +            {
> > +                byEntityName[saga.EntityName] = saga;
> > +            }
> > +
> > +            foreach (var saga in sagas)
> > +            {
> > +                byName[saga.Name] = saga;
> > +            }
> > +        }
> > +
> > +        public SagaMetadata FindByEntityName(string name)
> > +        {
> > +            return byEntityName[name];
> > +        }
> > +
> > +        public IEnumerable<SagaMetadata> All
>
> [image: :+1:]
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Particular/NServiceBus/pull/2416/files#r19196205>.
>