Пример #1
0
 public MicroHost(IMicroExecutor serviceExecutor, IMicroListener microListener, IServiceRegister serviceRegister,
                  IMicroEntryFactory entryFactory) : base(serviceExecutor, microListener)
 {
     _serviceRegister = serviceRegister;
     _entryFactory    = entryFactory;
     _logger          = LogManager.Logger <MicroHost>();
 }
Пример #2
0
 public GrpcMicroListener(ILoggerFactory loggerFactory, IMicroEntryFactory entryFactory, IServiceProvider provider)
 {
     _loggerFactory = loggerFactory;
     _entryFactory  = entryFactory;
     _provider      = provider;
     _logger        = loggerFactory.CreateLogger <GrpcMicroListener>();
 }
Пример #3
0
 public MicroHost(ILogger <MicroHost> logger, IMicroExecutor serviceExecutor, IMicroListener microListener,
                  IServiceRegister serviceRegister, IMicroEntryFactory entryFactory)
     : base(logger, serviceExecutor, microListener)
 {
     _serviceRegister = serviceRegister;
     _entryFactory    = entryFactory;
     _logger          = logger;
 }
Пример #4
0
        //private readonly ServiceProtocol _protocol;

        /// <summary> 服务宿主机 </summary>
        /// <param name="serviceExecutor"></param>
        /// <param name="microListener"></param>
        /// <param name="serviceRegister"></param>
        /// <param name="entryFactory"></param>
        /// <param name="loggerFactory"></param>
        public MicroHost(IMicroExecutor serviceExecutor, IMicroListener microListener,
                         IServiceRegister serviceRegister, IMicroEntryFactory entryFactory, ILoggerFactory loggerFactory)
            : base(serviceExecutor, microListener, loggerFactory)
        {
            _serviceRegister = serviceRegister;
            _entryFactory    = entryFactory;
            _logger          = loggerFactory.CreateLogger <MicroHost>();
            //var protocol = microListener.GetType().GetCustomAttribute<ProtocolAttribute>();
            //if (protocol != null)
            //    _protocol = protocol.Protocol;
        }
Пример #5
0
 public MicroExecutor(IMicroEntryFactory entryFactory)
 {
     _entryFactory = entryFactory;
     _logger       = LogManager.Logger <MicroExecutor>();
 }
Пример #6
0
 public MicroExecutor(ILogger <MicroExecutor> logger, IServiceProvider provider, IMicroEntryFactory entryFactory)
 {
     _entryFactory = entryFactory;
     _logger       = logger;
     _provider     = provider;
 }
Пример #7
0
 public HttpMicroListener(IMessageCodec messageCodec, IMicroEntryFactory entryFactory, ILoggerFactory loggerFactory)
 {
     _messageCodec = messageCodec;
     _entryFactory = entryFactory;
     _logger       = loggerFactory.CreateLogger <HttpMicroListener>();
 }