public void Registrar(comum.dto.Perfil perfil)
        {
            var client   = new PerfilClient();
            var response = client.Registrar(new adduo.helper.envelopes.RequestEnvelope <comum.dto.Perfil>(perfil));

            response.ThrownIfError();
        }
예제 #2
0
 public Dashboard(
     ClassificadorClient classificadorClient,
     PerfilClient perfilClient)
 {
     this.classificadorClient = classificadorClient;
     this.perfilClient        = perfilClient;
 }
예제 #3
0
        private void IrAMiPerfil(object sender, RoutedEventArgs e)
        {
            if (frameNavegacion.Content.GetType() != typeof(MiPerfil))
            {
                InstanceContext contexto = new InstanceContext(this);
                PerfilClient    servidor = new PerfilClient(contexto);

                string nicknameJugador = (this.DataContext as Jugador).Nickname;

                try
                {
                    servidor.BuscarJugador(nicknameJugador);
                }
                catch (EndpointNotFoundException)
                {
                    new Mensaje
                    {
                        TituloMensaje = "Ups!",
                        Contenido     = "Lo sentimos, ocurrió un error en el servidor. Intente más tarde."
                    }.ShowDialog();
                }
                catch (CommunicationObjectFaultedException)
                {
                    new Mensaje
                    {
                        TituloMensaje = Properties.Resources.ErrorServidor_TituloContenido,
                        Contenido     = Properties.Resources.ErrorServidor_MensajeContenido
                    }.ShowDialog();
                }
            }
        }
예제 #4
0
        public void ObtenerInformacionJugador_NoExisteJugador_JugadorNulo()
        {
            try
            {
                Uri baseAddress = new Uri("net.tcp://localhost:8090/UNO.Contratos");
                serviceHost = new ServiceHost(typeof(UNO.Contratos.JuegoUNOServicio), baseAddress);
                Binding                 binding         = new NetTcpBinding();
                EndpointAddress         endpointAddress = new EndpointAddress("net.tcp://localhost:8090/UNOServerTest");
                var                     endpoint        = serviceHost.AddServiceEndpoint(typeof(UNO.Contratos.Login.ILogin), binding, endpointAddress.Uri);
                ServiceMetadataBehavior smb             = new ServiceMetadataBehavior
                {
                    HttpGetEnabled = false
                };
                serviceHost.Description.Behaviors.Add(smb);

                perfilAdmin     = new PerfilCallbackAdmin();
                instanceContext = new InstanceContext(perfilAdmin);
                perfilCliente   = new PerfilClient(instanceContext);
                endpoint.Name   = perfilCliente.Endpoint.Name;

                serviceHost.Open();

                string nicknameIncorrecto = "nicknameIncorrecto";

                perfilCliente.BuscarJugador(nicknameIncorrecto);

                Jugador jugadorObtenido = perfilAdmin.Jugador;

                Assert.IsNull(jugadorObtenido);
            }
            catch (EndpointNotFoundException)
            {
            }
        }
예제 #5
0
 public Servico(PerfilClient perfilClient,
                PostClient postClient,
                CompartilhamentoClient compartilhamentoClient)
 {
     this.perfilClient           = perfilClient;
     this.postClient             = postClient;
     this.compartilhamentoClient = compartilhamentoClient;
 }
 public RestritoPerfilController(
     IConfiguration configuration,
     EmpresaSettings empresaSettings,
     PerfilClient perfilClient
     ) : base(configuration, empresaSettings)
 {
     this.perfilClient = perfilClient;
 }
예제 #7
0
 public PingService(
     PingKeyService pingKeyService,
     TwitchPingConfig pingConfig,
     PerfilClient perfilClient,
     EnfileiradorClient enfileiradorClient,
     PingValidar pingValidar) : base(perfilClient)
 {
     this.pingKeyService     = pingKeyService;
     this.pingConfig         = pingConfig;
     this.enfileiradorClient = enfileiradorClient;
     this.pingValidar        = pingValidar;
 }
예제 #8
0
 public Whisper(
     GeradorJWT jwt,
     TwitchSettings twitchSettings,
     PerfilClient perfilClient,
     EmpresaClient empresaClient,
     ClassificadorClient classificadorClient)
 {
     this.jwt                 = jwt;
     this.twitchSettings      = twitchSettings;
     this.perfilClient        = perfilClient;
     this.empresaClient       = empresaClient;
     this.classificadorClient = classificadorClient;
 }
예제 #9
0
        public void ObtenerInformacionJugador_ExisteJugador_InformacionCorrecta()
        {
            try
            {
                Uri baseAddress = new Uri("net.tcp://*****:*****@gmail.com",
                    Experiencia       = 44,
                };

                perfilCliente.BuscarJugador(jugadorEsperado.Nickname);

                Jugador jugadorObtenido = perfilAdmin.Jugador;

                Assert.IsTrue
                (
                    jugadorEsperado.Nickname == jugadorObtenido.Nickname &&
                    jugadorEsperado.CorreoElectronico == jugadorObtenido.CorreoElectronico &&
                    jugadorEsperado.Experiencia == jugadorObtenido.Experiencia
                );
            }
            catch (EndpointNotFoundException)
            {
            }
        }
 public IdentificadorUsuario(PerfilClient client)
 {
     this.client = client;
 }
예제 #11
0
 public BaseService(PerfilClient perfilClient)
 {
     this.perfilClient = perfilClient;
 }
 public IntegracaoUsuarioService(PerfilClient perfilClient)
 {
     this.perfilClient = perfilClient;
 }
예제 #13
0
        public ResponseEnvelope Enviar()
        {
            var client = new PerfilClient();

            return(client.Desconectar(perfil.UsuarioId, perfil.PerfilId, perfil.RedeSocial, perfil.Ativo));
        }