public static void Main(string[] args) { GenericPrincipal.ClaimsPrincipalSelector = () => { var identity = new ClaimsIdentity(); identity.AddClaim(new Claim("Name", "Unknown")); var principal = new ClaimsPrincipal(identity); return(principal); }; var p = GenericPrincipal.Current; Configure.DiscoverAndConfigure(); var typeDiscoverer = Configure.Instance.Container.Get <ITypeDiscoverer>(); var commandCoordinator = Configure.Instance.Container.Get <ICommandCoordinator>(); var command = new MyCommand(); command.Something = "Hello"; var result = commandCoordinator.Handle(command); }
public void Handle(MyCommand command) { var ar = _repository.Get(Guid.NewGuid()); ar.DoStuff(); }