public ConsulServiceGatewayFactory(DefaultGatewayDelegate defaultGateway, IServiceDiscovery<ConsulService, ServiceRegistration> discoveryClient)
        {
            defaultGateway.ThrowIfNull(nameof(defaultGateway));
            discoveryClient.ThrowIfNull(nameof(discoveryClient));

            this.defaultGateway = defaultGateway;
            this.discoveryClient = discoveryClient;
            this.LocalTypes = HostContext.Metadata?.RequestTypes ?? new HashSet<Type>();
        }
Ejemplo n.º 2
0
        public ConsulServiceGatewayFactory(DefaultGatewayDelegate defaultGateway, IServiceDiscovery <ConsulService, ServiceRegistration> discoveryClient)
        {
            defaultGateway.ThrowIfNull(nameof(defaultGateway));
            discoveryClient.ThrowIfNull(nameof(discoveryClient));

            this.defaultGateway  = defaultGateway;
            this.discoveryClient = discoveryClient;
            this.LocalTypes      = HostContext.Metadata?.RequestTypes ?? new HashSet <Type>();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Override the default remote service client
 /// </summary>
 /// <param name="externalGateway">the external gateway to use</param>
 public void SetDefaultGateway(DefaultGatewayDelegate externalGateway)
 {
     defaultGateway = externalGateway;
 }