Beispiel #1
0
        public QueueService()
        {
            StructureMapAspNet.Configure(Assembly.GetExecutingAssembly());
            var config = new CommandProcessorNirvanaConfig();

            NirvanaSetup.Configure()
            .SetAdditionalAssemblyNameReferences(config.AssemblyNameReferences)
            .SetRootTypeAssembly(typeof(Services.Shared.InfrastructureRoot).Assembly)
            .SetAttributeMatchingFunction(config.AttributeMatchingFunction)
            .SetDependencyResolver(config.GetService, config.GetAllServices)
            .ForCommands(MediationStrategy.ForwardToWeb, MediationStrategy.ForwardToQueue, MediationStrategy.ForwardToQueue)
            .ForInternalEvents(MediationStrategy.ForwardToWeb, MediationStrategy.ForwardToQueue, MediationStrategy.ForwardToQueue)
            .ForUiNotifications(MediationStrategy.ForwardToWeb, MediationStrategy.ForwardToQueue, MediationStrategy.ForwardToQueue)
            .BuildConfiguration()
            ;

            _queueController = InternalDependencyResolver.GetInstance <IQueueController>();
        }
 public object GetService(Type serviceType) => InternalDependencyResolver.GetInstance(serviceType);