示例#1
0
        public MessagingRoot(
            MessagingSerializationGraph serialization,
            MessagingSettings settings,
            HandlerGraph handlers,
            IDurableMessagingFactory factory,
            IChannelGraph channels,
            ISubscriptionsRepository subscriptions,
            IMessageLogger messageLogger,
            Lamar.IContainer container,
            ITransportLogger transportLogger)
        {
            Settings         = settings;
            _handlers        = handlers;
            _transportLogger = transportLogger;
            Replies          = new ReplyWatcher();
            Factory          = factory;
            Channels         = channels;
            Transports       = container.QuickBuildAll <ITransport>().ToArray();



            Lookup = new UriAliasLookup(container.QuickBuildAll <IUriLookup>());


            Serialization = serialization;

            Logger = messageLogger;

            Pipeline = new HandlerPipeline(Serialization, handlers, Replies, Logger, container.QuickBuildAll <IMissingHandler>(),
                                           this);

            Workers = new WorkerQueue(Logger, Pipeline, settings);

            Router = new MessageRouter(Serialization, channels, subscriptions, handlers, Logger, Lookup, settings);

            // TODO -- ZOMG this is horrible, and I admit it.
            if (Factory is NulloDurableMessagingFactory f)
            {
                f.ScheduledJobs = ScheduledJobs;
            }
        }
示例#2
0
 public InfrastructureContainer(Lamar.IContainer container)
 {
     _container = container;
 }
 public OrchRPCProgressWatcher(Lamar.IContainer container, ILogger <IOrchRPCProgressWatcher> logger)
 {
     this.factoryContainer = container;
     this.logger           = logger;
 }
示例#4
0
 public override void Modify(IChain chain, GenerationRules rules, Lamar.IContainer container)
 {
     chain.Middleware.Add(new FakeWrapper3());
 }
示例#5
0
文件: IoC.cs 项目: IT-Labs/Blazor
 public static IContainer Initialize(IContainer container)
 {
     ContainerFactory.SetContainer(new InfrastructureContainer(container));
     return(container);
 }