public LinkService(IOptions <RemoteService> remote) { var configuration = Mapping.GetMapperConfiguration(); _mapper = configuration.CreateMapper(); _client = HrefsDispatcher.Instance(remote.Value.Url); }
public static MicroServices.Hrefs.HrefsClient Instance(string url) { AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true); var channel = GrpcChannel.ForAddress(url); var client = new MicroServices.Hrefs.HrefsClient(channel); return(client); }