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>(); }
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>(); }
/// <summary> /// Override the default remote service client /// </summary> /// <param name="externalGateway">the external gateway to use</param> public void SetDefaultGateway(DefaultGatewayDelegate externalGateway) { defaultGateway = externalGateway; }