/// <summary>
 /// Initializes a new instance of the <see cref="HttpRequestFilterAttribute" /> class.
 /// </summary>
 public HttpRequestFilterAttribute()
 {
     _serviceRouteProvider = ServiceLocator.Current.Resolve <IServiceRouteProvider>();
     ;
     _serviceEntryLocate = ServiceLocator.Current.Resolve <IServiceEntryLocate>();
     ;
 }
Esempio n. 2
0
 public AuthorizationServerProvider(IServiceProxyProvider serviceProxyProvider,
                                    IServiceRouteProvider serviceRouteProvider)
 {
     _serviceProxyProvider = serviceProxyProvider;
     _serviceRouteProvider = serviceRouteProvider;
     _cacheProvider        = CacheContainer.GetService <ICacheProvider>(GatewayConfig.CacheMode);
 }
Esempio n. 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);
        }
Esempio n. 4
0
 public AuthController()
 {
     _authProxy                   = serviceProxyFactory.CreateProxy <IAuthAppService>();
     _serviceProxyProvider        = ServiceLocator.GetService <IServiceProxyProvider>();
     _serviceRouteProvider        = ServiceLocator.GetService <IServiceRouteProvider>();        //serviceRouteProvider;
     _authorizationServerProvider = ServiceLocator.GetService <IAuthorizationServerProvider>(); // authorizationServerProvider;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 7
0
 public ServicesController(IServiceProxyProvider serviceProxyProvider,
                           IServiceRouteProvider serviceRouteProvider,
                           IAuthorizationServerProvider authorizationServerProvider)
 {
     _serviceProxyProvider        = serviceProxyProvider;
     _serviceRouteProvider        = serviceRouteProvider;
     _authorizationServerProvider = authorizationServerProvider;
 }
Esempio n. 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;
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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");
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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();
        }
Esempio n. 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");
 }
Esempio n. 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());
     }
 }
Esempio n. 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;
 }
Esempio n. 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);
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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);
 }
Esempio n. 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;
        }
Esempio n. 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> >();
     }
 }
Esempio n. 27
0
 public ServiceProxyFactory(IRemoteInvokeService remoteInvokeService, ITypeConvertibleService typeConvertibleService,
                            IServiceProvider serviceProvider, IServiceRouteProvider serviceRouteProvider) : this(remoteInvokeService, typeConvertibleService, serviceProvider, serviceRouteProvider, null, null)
 {
 }
Esempio n. 28
0
 public ServicesController()
 {
     _serviceProxyProvider = ServiceLocator.GetService <IServiceProxyProvider>();
     _serviceRouteProvider = ServiceLocator.GetService <IServiceRouteProvider>();
 }
 public RemoteServiceProxy(IRemoteInvokeService remoteInvokeService,
                           ITypeConvertibleService typeConvertibleService, String serviceKey,
                           CPlatformContainer serviceProvider, IServiceRouteProvider serviceRouteProvider
                           ) : base(remoteInvokeService, typeConvertibleService, serviceKey, serviceProvider)
 {
 }
Esempio n. 30
0
 public ServiceProxyProvider(IServiceRouteProvider serviceRouteProvider
                             , CPlatformContainer serviceProvider)
 {
     _serviceRouteProvider = serviceRouteProvider;
     _serviceProvider      = serviceProvider;
 }