/// <summary>
 /// Initializes a new instance of the <see cref="HttpRequestFilterAttribute" /> class.
 /// </summary>
 public HttpRequestFilterAttribute()
 {
     _serviceRouteProvider = ServiceLocator.Current.Resolve <IServiceRouteProvider>();
     ;
     _serviceEntryLocate = ServiceLocator.Current.Resolve <IServiceEntryLocate>();
     ;
 }
예제 #2
0
 public AuthorizationServerProvider(IServiceProxyProvider serviceProxyProvider,
                                    IServiceRouteProvider serviceRouteProvider)
 {
     _serviceProxyProvider = serviceProxyProvider;
     _serviceRouteProvider = serviceRouteProvider;
     _cacheProvider        = CacheContainer.GetService <ICacheProvider>(GatewayConfig.CacheMode);
 }
예제 #3
0
        private readonly ICacheProvider _cacheProvider;               //缓存

        /// <summary>
        /// 安全验证服务提供类构造
        /// </summary>
        /// <param name="serviceProxyProvider">服务代理</param>
        /// <param name="serviceRouteProvider">用务路由</param>
        public AuthorizationServerProvider(IServiceProxyProvider serviceProxyProvider
                                           , IServiceRouteProvider serviceRouteProvider)
        {
            _serviceProxyProvider = serviceProxyProvider;
            _serviceRouteProvider = serviceRouteProvider;
            _cacheProvider        = CacheContainer.GetService <ICacheProvider>(AppConfig.SwaggerOptions.Authorization.CacheMode);
        }
예제 #4
0
 public AuthController()
 {
     _authProxy                   = serviceProxyFactory.CreateProxy <IAuthAppService>();
     _serviceProxyProvider        = ServiceLocator.GetService <IServiceProxyProvider>();
     _serviceRouteProvider        = ServiceLocator.GetService <IServiceRouteProvider>();        //serviceRouteProvider;
     _authorizationServerProvider = ServiceLocator.GetService <IAuthorizationServerProvider>(); // authorizationServerProvider;
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpMessageListener" /> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="serviceRouteProvider">The service route provider.</param>
 public HttpMessageListener(ILogger <HttpMessageListener> logger, ISerializer <string> serializer,
                            IServiceRouteProvider serviceRouteProvider)
 {
     _logger               = logger;
     _serializer           = serializer;
     _serviceRouteProvider = serviceRouteProvider;
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EchoService" /> class.
 /// </summary>
 /// <param name="hashAlgorithm">The hash algorithm.</param>
 /// <param name="serviceRouteProvider">The service route provider.</param>
 /// <param name="container">The container.</param>
 /// <param name="serviceHeartbeatManager">The service heartbeat manager.</param>
 public EchoService(IHashAlgorithm hashAlgorithm, IServiceRouteProvider serviceRouteProvider,
                    CPlatformContainer container, IServiceHeartbeatManager serviceHeartbeatManager)
 {
     _hashAlgorithm           = hashAlgorithm;
     _addressSelector         = container.GetInstances <IAddressSelector>(AddressSelectorMode.HashAlgorithm.ToString());
     _serviceRouteProvider    = serviceRouteProvider;
     _serviceHeartbeatManager = serviceHeartbeatManager;
 }
예제 #7
0
 public ServicesController(IServiceProxyProvider serviceProxyProvider,
                           IServiceRouteProvider serviceRouteProvider,
                           IAuthorizationServerProvider authorizationServerProvider)
 {
     _serviceProxyProvider        = serviceProxyProvider;
     _serviceRouteProvider        = serviceRouteProvider;
     _authorizationServerProvider = authorizationServerProvider;
 }
예제 #8
0
 /// <summary>
 /// 安全验证服务提供类构造
 /// </summary>
 /// <param name="serviceProxyProvider">服务代理</param>
 /// <param name="serviceRouteProvider">用务路由</param>
 public AuthorizationServerProvider(IServiceProxyProvider serviceProxyProvider
                                    , IServiceRouteProvider serviceRouteProvider,
                                    IJwtTokenProvider jwtTokenProvider)
 {
     _serviceProxyProvider = serviceProxyProvider;
     _serviceRouteProvider = serviceRouteProvider;
     _jwtTokenProvider     = jwtTokenProvider;
 }
 public AuthorizationServerProvider(IServiceProxyProvider serviceProxyProvider
                                    , IServiceRouteProvider serviceRouteProvider
                                    , CPlatformContainer serviceProvider)
 {
     _serviceProvider      = serviceProvider;
     _serviceProxyProvider = serviceProxyProvider;
     _serviceRouteProvider = serviceRouteProvider;
 }
예제 #10
0
 public DefaultServiceExecutor(IServiceEntryLocate serviceEntryLocate, IServiceRouteProvider serviceRouteProvider,
                               IAuthorizationFilter authorizationFilter,
                               ILogger <DefaultServiceExecutor> logger)
 {
     _serviceEntryLocate   = serviceEntryLocate;
     _logger               = logger;
     _serviceRouteProvider = serviceRouteProvider;
     _authorizationFilter  = authorizationFilter;
 }
 public AuthorizationServerProvider(ConfigInfo configInfo, IServiceProxyProvider serviceProxyProvider
                                    , IServiceRouteProvider serviceRouteProvider
                                    , CPlatformContainer serviceProvider)
 {
     _serviceProvider      = serviceProvider;
     _serviceProxyProvider = serviceProxyProvider;
     _serviceRouteProvider = serviceRouteProvider;
     _cacheProvider        = CacheContainer.GetService <ICacheProvider>(AppConfig.CacheMode);
 }
예제 #12
0
 public ServicesController(IServiceProxyProvider serviceProxyProvider,
                           IServiceRouteProvider serviceRouteProvider,
                           IAuthorizationServerProvider authorizationServerProvider)
 {
     _serviceProxyProvider        = serviceProxyProvider;
     _serviceRouteProvider        = serviceRouteProvider;
     _authorizationServerProvider = authorizationServerProvider;
     _cacheProvider = CacheContainer.GetService <ICacheProvider>(Surging.Core.ApiGateWay.AppConfig.CacheMode);
 }
예제 #13
0
 public RtmpRemoteInvokeService(IServiceRouteProvider serviceRotueProvider, ILogger <RtmpRemoteInvokeService> logger,
                                IHealthCheckService healthCheckService,
                                ITransportClientFactory transportClientFactory)
 {
     _serviceRotueProvider = serviceRotueProvider;
     _logger                 = logger;
     _healthCheckService     = healthCheckService;
     _transportClientFactory = transportClientFactory;
     _routePath              = RoutePatternParser.Parse(AppConfig.Option.RouteTemplate, "ILiveRomtePublishService", "Publish");
 }
예제 #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServerHandler" /> class.
 /// </summary>
 /// <param name="readAction">The read action.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="serviceRouteProvider">The service route provider.</param>
 public ServerHandler(Action <IChannelHandlerContext, TransportMessage> readAction,
                      ILogger logger,
                      ISerializer <string> serializer,
                      IServiceRouteProvider serviceRouteProvider)
 {
     _readAction           = readAction;
     _logger               = logger;
     _serializer           = serializer;
     _serviceRouteProvider = serviceRouteProvider;
 }
예제 #15
0
 public HttpServiceExecutor(IServiceEntryLocate serviceEntryLocate, IServiceRouteProvider serviceRouteProvider,
                            IAuthorizationFilter authorizationFilter,
                            ILogger <HttpServiceExecutor> logger, CPlatformContainer serviceProvider, ITypeConvertibleService typeConvertibleService)
 {
     _serviceEntryLocate     = serviceEntryLocate;
     _logger                 = logger;
     _serviceProvider        = serviceProvider;
     _typeConvertibleService = typeConvertibleService;
     _serviceRouteProvider   = serviceRouteProvider;
     _authorizationFilter    = authorizationFilter;
 }
예제 #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DotNettyHttpServerMessageListener" /> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="codecFactory">The codec factory.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="serviceRouteProvider">The service route provider.</param>
 public DotNettyHttpServerMessageListener(ILogger <DotNettyHttpServerMessageListener> logger,
                                          ITransportMessageCodecFactory codecFactory,
                                          ISerializer <string> serializer,
                                          IServiceRouteProvider serviceRouteProvider)
 {
     _logger = logger;
     _transportMessageEncoder = codecFactory.GetEncoder();
     _transportMessageDecoder = codecFactory.GetDecoder();
     _serializer           = serializer;
     _serviceRouteProvider = serviceRouteProvider;
 }
예제 #17
0
        public ServiceRouteCompensator(ILogger <ServiceRouteCompensator> logger, IServiceRouteProvider serviceRouteProvider)
        {
            _logger = logger;
            _serviceRouteProvider = serviceRouteProvider;
            _timer         = new Timer();
            _timer.Enabled = true;

            _timer.Interval = GenerateInterval();
            _timer.Elapsed += _timer_Elapsed;
            _timer.Start();
        }
예제 #18
0
 public HttpExecutor(IServiceEntryLocate serviceEntryLocate, IServiceRouteProvider serviceRouteProvider,
                     IAuthorizationFilter authorizationFilter,
                     ITypeConvertibleService typeConvertibleService)
 {
     _serviceEntryLocate     = serviceEntryLocate;
     _typeConvertibleService = typeConvertibleService;
     _serviceRouteProvider   = serviceRouteProvider;
     _authorizationFilter    = authorizationFilter;
     //_serviceProxyProvider = serviceProxyProvider;
     _diagnosticListener = new DiagnosticListener("BimTechDiagnosticListener");
 }
예제 #19
0
 public ServiceProxyFactory(IRemoteInvokeService remoteInvokeService, ITypeConvertibleService typeConvertibleService,
                            IServiceProvider serviceProvider, IServiceRouteProvider serviceRouteProvider, IEnumerable <Type> types, IEnumerable <string> namespaces)
 {
     _serviceRouteProvider   = serviceRouteProvider;
     _remoteInvokeService    = remoteInvokeService;
     _typeConvertibleService = typeConvertibleService;
     _serviceProvider        = serviceProvider;
     if (types != null)
     {
         RegisterProxType(namespaces.ToArray(), types.ToArray());
     }
 }
예제 #20
0
 public DefaultAddressResolver(IServiceCommandProvider commandProvider, IServiceRouteProvider serviceRouteProvider, CPlatformContainer container,
                               IHealthCheckService healthCheckService,
                               IServiceHeartbeatManager serviceHeartbeatManager)
 {
     _container            = container;
     _serviceRouteProvider = serviceRouteProvider;
     _logger = logger;
     LoadAddressSelectors();
     _commandProvider         = commandProvider;
     _healthCheckService      = healthCheckService;
     _serviceHeartbeatManager = serviceHeartbeatManager;
 }
예제 #21
0
 public HttpExecutor(IServiceEntryLocate serviceEntryLocate, IServiceRouteProvider serviceRouteProvider,
                     IAuthorizationFilter authorizationFilter,
                     ILogger <HttpExecutor> logger, CPlatformContainer serviceProvider, IServiceProxyProvider serviceProxyProvider, ITypeConvertibleService typeConvertibleService)
 {
     _serviceEntryLocate     = serviceEntryLocate;
     _logger                 = logger;
     _serviceProvider        = serviceProvider;
     _typeConvertibleService = typeConvertibleService;
     _serviceRouteProvider   = serviceRouteProvider;
     _authorizationFilter    = authorizationFilter;
     _serviceProxyProvider   = serviceProxyProvider;
     _diagnosticListener     = new DiagnosticListener(DiagnosticListenerExtensions.DiagnosticListenerName);
 }
예제 #22
0
 public KestrelHttpMessageListener(ILogger <KestrelHttpMessageListener> logger,
                                   ISerializer <string> serializer,
                                   IServiceEngineLifetime lifetime,
                                   IModuleProvider moduleProvider,
                                   IServiceRouteProvider serviceRouteProvider,
                                   CPlatformContainer container) : base(logger, serializer, serviceRouteProvider)
 {
     _logger               = logger;
     _serializer           = serializer;
     _lifetime             = lifetime;
     _moduleProvider       = moduleProvider;
     _container            = container;
     _serviceRouteProvider = serviceRouteProvider;
 }
예제 #23
0
 public PermissionDomainService(IMenuDomainService menuDomainService,
                                IOperationDomainService operationDomainService,
                                IRoleDomainService roleDomainService,
                                IServiceRouteProvider serviceRouteProvider,
                                IUserDomainService userDomainService,
                                IUserGroupDomainService userGroupDomainService)
 {
     _menuDomainService      = menuDomainService;
     _operationDomainService = operationDomainService;
     _roleDomainService      = roleDomainService;
     _serviceRouteProvider   = serviceRouteProvider;
     _userDomainService      = userDomainService;
     _userGroupDomainService = userGroupDomainService;
 }
예제 #24
0
 public KestrelHttpMessageListener(ILogger <KestrelHttpMessageListener> logger,
                                   ISerializer <string> serializer,
                                   IServiceEngineLifetime lifetime,
                                   IModuleProvider moduleProvider,
                                   IServiceRouteProvider serviceRouteProvider,
                                   CPlatformContainer container) : base(logger, serializer, serviceRouteProvider)
 {
     _logger               = logger;
     _serializer           = serializer;
     _lifetime             = lifetime;
     _moduleProvider       = moduleProvider;
     _container            = container;
     _serviceRouteProvider = serviceRouteProvider;
     _diagnosticListener   = new DiagnosticListener(CPlatform.Diagnostics.DiagnosticListenerExtensions.DiagnosticListenerName);
 }
예제 #25
0
        public AuthController()

        /*  IServiceProxyProvider serviceProxyProvider,
         * IServiceRouteProvider serviceRouteProvider,
         * IAuthorizationServerProvider authorizationServerProvider)
         */
        {
            // ServiceLocator.GetService<IServiceProxyProvider>();  //
            //_serviceProxyProvider = serviceProxyProvider;
            //_serviceRouteProvider =  serviceRouteProvider;
            //_authorizationServerProvider =  authorizationServerProvider;

            _serviceProxyProvider        = ServiceLocator.GetService <IServiceProxyProvider>();
            _serviceRouteProvider        = ServiceLocator.GetService <IServiceRouteProvider>();        //serviceRouteProvider;
            _authorizationServerProvider = ServiceLocator.GetService <IAuthorizationServerProvider>(); // authorizationServerProvider;
        }
예제 #26
0
 protected ServiceProxyBase(IRemoteInvokeService remoteInvokeService,
                            ITypeConvertibleService typeConvertibleService, String serviceKey, CPlatformContainer serviceProvider, IServiceRouteProvider serviceRouteProvider)
 {
     _remoteInvokeService       = remoteInvokeService;
     _typeConvertibleService    = typeConvertibleService;
     _serviceKey                = serviceKey;
     _serviceProvider           = serviceProvider;
     _commandProvider           = serviceProvider.GetInstances <IServiceCommandProvider>();
     _breakeRemoteInvokeService = serviceProvider.GetInstances <IBreakeRemoteInvokeService>();
     _serviceRouteProvider      = serviceRouteProvider;
     _interceptors              = new List <IInterceptor>();
     if (serviceProvider.Current.IsRegistered <IInterceptor>())
     {
         _interceptors = serviceProvider.GetInstances <IEnumerable <IInterceptor> >();
     }
 }
예제 #27
0
 public ServiceProxyFactory(IRemoteInvokeService remoteInvokeService, ITypeConvertibleService typeConvertibleService,
                            IServiceProvider serviceProvider, IServiceRouteProvider serviceRouteProvider) : this(remoteInvokeService, typeConvertibleService, serviceProvider, serviceRouteProvider, null, null)
 {
 }
예제 #28
0
 public ServicesController()
 {
     _serviceProxyProvider = ServiceLocator.GetService <IServiceProxyProvider>();
     _serviceRouteProvider = ServiceLocator.GetService <IServiceRouteProvider>();
 }
예제 #29
0
 public RemoteServiceProxy(IRemoteInvokeService remoteInvokeService,
                           ITypeConvertibleService typeConvertibleService, String serviceKey,
                           CPlatformContainer serviceProvider, IServiceRouteProvider serviceRouteProvider
                           ) : base(remoteInvokeService, typeConvertibleService, serviceKey, serviceProvider)
 {
 }
예제 #30
0
 public ServiceProxyProvider(IServiceRouteProvider serviceRouteProvider
                             , CPlatformContainer serviceProvider)
 {
     _serviceRouteProvider = serviceRouteProvider;
     _serviceProvider      = serviceProvider;
 }