Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio n. 5
0
        public void Should_be_able_resolve_all_instances()
        {
            var container = new UnityComponentContainer(new UnityContainer());

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

            ServiceBus.Register(container);

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

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

            _bus = container.Resolve <IServiceBus>().Start();
        }
Esempio 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
                    });
                }
            }
        }
Esempio 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
                    });
                }
            }
        }