Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (50 sloc) 1.96 KB
#region (c) 2010-2012 Lokad - CQRS Sample for Windows Azure - New BSD License
// Copyright (c) Lokad 2010-2012,
// This code is released as Open Source under the terms of the New BSD Licence
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Lokad.Cqrs.AtomicStorage;
using SaaS.Aggregates.Register;
using SaaS.Aggregates.Security;
using SaaS.Aggregates.User;
using SaaS.Processes;
using SaaS.Services.UserIndex;
namespace SaaS
public static class DomainBoundedContext
public static string EsContainer = "hub-domain-tape";
public static IEnumerable<object> Projections(IDocumentStore docs)
yield return new UserIndexProjection(docs.GetWriter<byte, UserIndexLookup>());
public static IEnumerable<Func<CancellationToken, Task>> Tasks(ICommandSender service, IDocumentStore docs,
bool isTest)
var flow = new DomainSender(service);
// more tasks go here
yield break;
public static IEnumerable<object> Receptors(ICommandSender service)
var flow = new DomainSender(service);
yield return new ReplicationReceptor(flow);
yield return new RegistrationReceptor(flow);
// more senders go here
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;
Something went wrong with that request. Please try again.