예제 #1
0
        public void Add(BusServiceLayer layer, IBusService service)
		{
			lock (_services)
			{
				IList<IBusService> serviceList;
				if (!_services.TryGetValue((int) layer, out serviceList))
				{
					serviceList = new List<IBusService>();
					_services.Add((int) layer, serviceList);
				}

				serviceList.Add(service);
			}
		}
예제 #2
0
        public void Add(BusServiceLayer layer, IBusService service)
        {
            lock (_services)
            {
                IList <IBusService> serviceList;
                if (!_services.TryGetValue((int)layer, out serviceList))
                {
                    serviceList = new List <IBusService>();
                    _services.Add((int)layer, serviceList);
                }

                serviceList.Add(service);
            }
        }
예제 #3
0
 public void AddService(BusServiceLayer layer, IBusService service)
 {
     _catalog.Add(layer, service);
 }
예제 #4
0
 public DefaultBusServiceConfigurator(BusServiceLayer layer, Func <IServiceBus, TService> serviceFactory)
 {
     _serviceFactory = serviceFactory;
     _layer          = layer;
 }
예제 #5
0
 public void Add(BusServiceLayer layer, IBusService service)
 {
     _services[(int)layer].Add(service);
 }
예제 #6
0
		public void AddService(BusServiceLayer layer, IBusService service)
		{
			_catalog.Add(layer, service);
		}
        public static void AddService <TService>(this ServiceBusConfigurator configurator, BusServiceLayer layer,
                                                 Func <IServiceBus, TService> serviceFactory)
            where TService : IBusService
        {
            var serviceConfigurator = new DefaultBusServiceConfigurator <TService>(layer, serviceFactory);

            configurator.AddBusConfigurator(serviceConfigurator);
        }
        public static void ConfigureService <TServiceConfigurator>(this ServiceBusConfigurator configurator, BusServiceLayer layer,
                                                                   Action <TServiceConfigurator> configure)
            where TServiceConfigurator : BusServiceConfigurator, new()
        {
            var serviceConfigurator = new TServiceConfigurator();

            configure(serviceConfigurator);

            var busConfigurator = new CustomBusServiceConfigurator(serviceConfigurator);

            configurator.AddBusConfigurator(busConfigurator);
        }
예제 #9
0
 public void AddService(BusServiceLayer layer, IBusService service)
 {
     _serviceContainer.AddService(layer, service);
 }
예제 #10
0
 public void Add(BusServiceLayer layer, IBusService service)
 {
     _services[(int)layer].Add(service);
 }