Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void Handle(MyCommand command)
        {
            var ar = _repository.Get(Guid.NewGuid());

            ar.DoStuff();
        }