Exemplo n.º 1
0
        public System.Threading.Tasks.Task Raise <T>(T domainEvent) where T : IDomainEvent
        {
            var handlers = _container.GetAllInstances <IHandleEvent <IDomainEvent> >();
            var task     = Task.Factory.StartNew(() => RaiseAction(handlers, domainEvent));

            return(task);
        }
Exemplo n.º 2
0
 public IEnumerable <TResolve> ResolveAll <TResolve>() where TResolve : class
 {
     return(_container.GetAllInstances <TResolve>());
 }
Exemplo n.º 3
0
 public IEnumerable <object> GetServices(Type serviceType)
 {
     return(container.GetAllInstances(serviceType).Cast <object>());
 }
Exemplo n.º 4
0
 public IList <object> ResolveAll(Type modelType)
 {
     return((IList <object>)_mapContainer.GetAllInstances(modelType));
 }
 protected override IEnumerable <object> GetAllInstances(Type serviceType)
 {
     return(_container.GetAllInstances(serviceType).Cast <object>());
 }