Ejemplo n.º 1
0
        public static IEnumerable<object> EntityApplicationServices(IDocumentStore docs, IEventStore store, DomainIdentityGenerator id)
        {
            var unique = new UserIndexService(docs.GetReader<byte, UserIndexLookup>());
            var passwords = new PasswordGenerator();

            yield return new UserApplicationService(store);
            yield return new SecurityApplicationService(store, id, passwords);
            yield return new RegistrationApplicationService(store, id, unique, passwords);
            yield return id;
        }
Ejemplo n.º 2
0
        public static IEnumerable<object> ApplicationServices(IDocumentStore docs, IEventStore store)
        {
            var storage = new NuclearStorage(docs);
            var id = new DomainIdentityGenerator(storage);
            var unique = new UserIndexService(storage);
            var passwords = new PasswordGenerator();

            yield return new UserApplicationService(store);
            yield return new SecurityApplicationService(store, id, passwords, unique);
            yield return new RegistrationApplicationService(store, id, unique, passwords);
            yield return id;
        }