Example #1
0
 public DefaultWSServiceEntryProvider(IServiceEntryProvider serviceEntryProvider, ILogger <DefaultWSServiceEntryProvider> logger, CPlatformContainer serviceProvider, WebSocketOptions options)
 {
     _types           = serviceEntryProvider.GetTypes();
     _logger          = logger;
     _serviceProvider = serviceProvider;
     _options         = options;
 }
Example #2
0
        /// <summary>
        /// Initializes the specified context.
        /// </summary>
        /// <param name="context">The context.</param>
        public override void Initialize(ModuleInitializationContext context)
        {
            var serviceProvider = context.ServiceProvoider;

            _serviceSchemaProvider = serviceProvider.GetInstances <IServiceSchemaProvider>();
            _serviceEntryProvider  = serviceProvider.GetInstances <IServiceEntryProvider>();
        }
 public DefaultUdpServiceEntryProvider(IServiceEntryProvider serviceEntryProvider,
                                       ILogger <DefaultUdpServiceEntryProvider> logger,
                                       CPlatformContainer serviceProvider)
 {
     _types           = serviceEntryProvider.GetTypes();
     _logger          = logger;
     _serviceProvider = serviceProvider;
 }
Example #4
0
 public ActionAppService(IActionDomainService actionDomainService,
                         IServiceEntryProvider serviceEntryProvider,
                         ILogger <ActionAppService> logger)
 {
     _actionDomainService  = actionDomainService;
     _serviceEntryProvider = serviceEntryProvider;
     _logger = logger;
 }
 public SwaggerGenerator(
     IApiDescriptionGroupCollectionProvider apiDescriptionsProvider,
     ISchemaRegistryFactory schemaRegistryFactory,
     SwaggerGeneratorOptions options)
 {
     _apiDescriptionsProvider = apiDescriptionsProvider;
     _schemaRegistryFactory   = schemaRegistryFactory;
     _options = options ?? new SwaggerGeneratorOptions();
     _serviceEntryProvider = ServiceLocator.Current.Resolve <IServiceEntryProvider>();
 }
 public KestrelHttpMessageListener(ILogger <KestrelHttpMessageListener> logger,
                                   ISerializer <string> serializer,
                                   IServiceSchemaProvider serviceSchemaProvider, IServiceEngineLifetime lifetime, IServiceEntryProvider serviceEntryProvider) : base(logger, serializer)
 {
     _logger                = logger;
     _serializer            = serializer;
     _serviceSchemaProvider = serviceSchemaProvider;
     _lifetime              = lifetime;
     _serviceEntryProvider  = serviceEntryProvider;
 }
Example #7
0
 public SwaggerGenerator(
     SwaggerGeneratorOptions options,
     IApiDescriptionGroupCollectionProvider apiDescriptionsProvider,
     ISchemaGenerator schemaGenerator)
 {
     _options = options ?? new SwaggerGeneratorOptions();
     _apiDescriptionsProvider = apiDescriptionsProvider;
     _schemaGenerator         = schemaGenerator;
     _serviceEntryProvider    = ServiceLocator.Current.Resolve <IServiceEntryProvider>();
 }
Example #8
0
        private void Initialize(IServiceEntryProvider provider)
        {
            var entries = provider.GetEntries();

            if (entries != null && entries.Any())
            {
                foreach (var entry in entries)
                {
                    _entryCache.AddOrUpdate(entry.ServiceId, entry, (k, v) => entry);
                }
            }
            else
            {
                if (_logger.IsEnabled(LogLevel.Debug))
                {
                    _logger.LogDebug("没有发现可注册的服务");
                }
            }
        }
Example #9
0
 public DefaultServiceSchemaProvider(IServiceEntryProvider serviceEntryProvider)
 {
     _serviceEntryProvider = serviceEntryProvider;
 }
 public DefaultServiceSchemaProvider(IServiceEngineBuilder serviceEngineBuilder, IServiceEntryProvider serviceEntryProvider)
 {
     _serviceEngineBuilder = serviceEngineBuilder;
     _serviceEntryProvider = serviceEntryProvider;
 }
Example #11
0
 public DefaultServiceEntryLocator(IServiceEntryProvider provider, ILogger <DefaultServiceEntryLocator> logger)
 {
     _logger = logger;
     //todo:添加服务注册
     Initialize(provider);
 }
Example #12
0
 public override void Initialize(CPlatformContainer serviceProvider)
 {
     _serviceSchemaProvider = serviceProvider.GetInstances <IServiceSchemaProvider>();
     _serviceEntryProvider  = serviceProvider.GetInstances <IServiceEntryProvider>();
 }
 public DefaultMqttBehaviorProvider(IServiceEntryProvider serviceEntryProvider, CPlatformContainer serviceProvider)
 {
     _serviceEntryProvider = serviceEntryProvider;
     _serviceProvider      = serviceProvider;
 }