Esempio n. 1
0
        public static void Main(string[] args)
        {
            CreateHostBuilder(args).Build().Run();
            using (var conjugador = new ServicioConjugacionClient(ServicioConjugacionClient.EndpointConfiguration.BasicHttpsBinding_IServicioConjugacion))
            {
                using (var lematizador = new ServicioLematizacionClient(ServicioLematizacionClient.EndpointConfiguration.BasicHttpsBinding_IServicioLematizacion))
                {
                    using (var corrector = new ServicioSpellerClient(ServicioSpellerClient.EndpointConfiguration.BasicHttpsBinding_IServicioSpeller))
                    {
                        ThreadPool.QueueUserWorkItem(
                            new WaitCallback(delegate
                        {
                            while (true)
                            {
                                Thread.Sleep(TimeSpan.FromSeconds(100));
                                QueueDummyIOCPWork();
                            }
                        }));

                        conjugador.OpenAsync();
                        lematizador.OpenAsync();
                        corrector.OpenAsync();

                        Console.WriteLine("Service running...");
                        Console.ReadKey(false);
                    }
                }
            }
        }
        public async Task <List <string> > GetSugerenciasAsync(string verb)
        {
            ServicioSpellerClient client = new ServicioSpellerClient(ServicioSpellerClient.EndpointConfiguration.BasicHttpsBinding_IServicioSpeller);

            List <string> sugerencias = await client.SugerenciasAsync(verb, true);

            await client.CloseAsync();

            return(sugerencias);
        }
        public async Task <List <string> > GetSimilaresAsync(string verb)
        {
            ServicioSpellerClient client = new ServicioSpellerClient(ServicioSpellerClient.EndpointConfiguration.BasicHttpsBinding_IServicioSpeller);

            List <string> similitudes = await client.SimilaresAsync(verb);

            await client.CloseAsync();

            return(similitudes);
        }
Esempio n. 4
0
 public ServicioSpellerClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(ServicioSpellerClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Esempio n. 5
0
 public ServicioSpellerClient(EndpointConfiguration endpointConfiguration) :
     base(ServicioSpellerClient.GetBindingForEndpoint(endpointConfiguration), ServicioSpellerClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }