Exemplo n.º 1
0
        public void Should_be_able_to_register_and_resolve_transient_open_generic_components()
        {
            var container = new UnityComponentContainer(new UnityContainer());

            RegisterTransientGeneric(container);
            ResolveTransientGeneric(container);
        }
Exemplo n.º 2
0
        public void Should_be_able_to_register_and_resolve_an_open_generic_singleton()
        {
            var container = new UnityComponentContainer(new UnityContainer());

            RegisterSingletonGeneric(container);
            ResolveSingletonGeneric(container);
        }
Exemplo n.º 3
0
        public void Should_be_able_to_register_and_resolve_multiple_transient_components()
        {
            var container = new UnityComponentContainer(new UnityContainer());

            RegisterMultipleTransient(container);
            ResolveMultipleTransient(container);
        }
Exemplo n.º 4
0
        public void Should_be_able_to_register_and_resolve_a_multiple_singleton()
        {
            var container = new UnityComponentContainer(new UnityContainer());

            RegisterMultipleSingleton(container);
            ResolveMultipleSingleton(container);
        }
Exemplo n.º 5
0
        public void Should_be_able_resolve_all_instances()
        {
            var container = new UnityComponentContainer(new UnityContainer());

            RegisterCollection(container);
            ResolveCollection(container);
        }
Exemplo n.º 6
0
        public void Start()
        {
            var container = new UnityComponentContainer(new UnityContainer());

            ServiceBus.Register(container);

            _bus = ServiceBus.Create(container).Start();
        }
Exemplo n.º 7
0
        public void Start()
        {
            var container = new UnityComponentContainer(new UnityContainer());

            container.Register <IAzureStorageConfiguration, DefaultAzureStorageConfiguration>();
            container.RegisterServiceBus();

            _bus = container.Resolve <IServiceBus>().Start();
        }
Exemplo n.º 8
0
        private static void Main(string[] args)
        {
            var container = new UnityComponentContainer(new UnityContainer());

            ServiceBus.Register(container);

            using (var bus = ServiceBus.Create(container).Start())
            {
                string userName;

                while (!string.IsNullOrEmpty(userName = Console.ReadLine()))
                {
                    bus.Send(new RegisterMemberCommand
                    {
                        UserName = userName
                    });
                }
            }
        }
Exemplo n.º 9
0
        private static void Main(string[] args)
        {
            var container = new UnityComponentContainer(new UnityContainer());

            container.Register <IAzureStorageConfiguration, DefaultAzureStorageConfiguration>();
            container.RegisterServiceBus();

            using (var bus = container.Resolve <IServiceBus>().Start())
            {
                string userName;

                while (!string.IsNullOrEmpty(userName = Console.ReadLine()))
                {
                    bus.Send(new RegisterMemberCommand
                    {
                        UserName = userName
                    });
                }
            }
        }