Exemplo n.º 1
0
        public LinkService(IOptions <RemoteService> remote)
        {
            var configuration = Mapping.GetMapperConfiguration();

            _mapper = configuration.CreateMapper();
            _client = HrefsDispatcher.Instance(remote.Value.Url);
        }
Exemplo n.º 2
0
        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);
        }