public Services(TTransport transport) { SessionService = new SessionService.Client(new TMultiplexedProtocol(new TBinaryProtocol(new TFramedTransport(transport)), Utility.Helper.NameOf(() => SessionService))); UserService = new UserService.Client(new TMultiplexedProtocol(new TBinaryProtocol(new TFramedTransport(transport)), Utility.Helper.NameOf(() => UserService))); SettingService = new SettingService.Client(new TMultiplexedProtocol(new TBinaryProtocol(new TFramedTransport(transport)), Utility.Helper.NameOf(() => SettingService))); ChatService = new ChatService.Client(new TMultiplexedProtocol(new TBinaryProtocol(new TFramedTransport(transport)), Utility.Helper.NameOf(() => ChatService))); ChatUserInfoService = new ChatUserInfoService.Client(new TMultiplexedProtocol(new TBinaryProtocol(new TFramedTransport(transport)), Utility.Helper.NameOf(() => ChatUserInfoService))); ChatGroupService = new ChatGroupService.Client(new TMultiplexedProtocol(new TBinaryProtocol(new TFramedTransport(transport)), Utility.Helper.NameOf(() => ChatGroupService))); InboxService = new InboxService.Client(new TMultiplexedProtocol(new TBinaryProtocol(new TFramedTransport(transport)), Utility.Helper.NameOf(() => InboxService))); InboxRuleService = new InboxRuleService.Client(new TMultiplexedProtocol(new TBinaryProtocol(new TFramedTransport(transport)), Utility.Helper.NameOf(() => InboxRuleService))); ElifService = new ElifService.Client(new TMultiplexedProtocol(new TBinaryProtocol(new TFramedTransport(transport)), Utility.Helper.NameOf(() => ElifService))); SearchService = new SearchService.Client(new TMultiplexedProtocol(new TBinaryProtocol(new TFramedTransport(transport)), Utility.Helper.NameOf(() => SearchService))); NotificationService = new NotificationService.Client(new TMultiplexedProtocol(new TBinaryProtocol(new TFramedTransport(transport)), Utility.Helper.NameOf(() => NotificationService))); }
public static void Conectar() { Transporte = new TSocket("localhost", 9090); Transporte.Open(); ProtocoloBinario = new TBinaryProtocol(Transporte); CuentaServiceProtocolo = new TMultiplexedProtocol(ProtocoloBinario, nameof(CuentaService)); ExperienciaEducativaServiceProtocolo = new TMultiplexedProtocol(ProtocoloBinario, nameof(ExperienciaEducativaService)); SalonDeClasesServiceProtocolo = new TMultiplexedProtocol(ProtocoloBinario, nameof(SalonDeClasesService)); ChatServiceProtocolo = new TMultiplexedProtocol(ProtocoloBinario, nameof(ChatService)); PresentacionServiceProtocolo = new TMultiplexedProtocol(ProtocoloBinario, nameof(PresentacionService)); CuentaServiceCliente = new CuentaService.Client(CuentaServiceProtocolo); ExperienciaEducativaServiceCliente = new ExperienciaEducativaService.Client(ExperienciaEducativaServiceProtocolo); SalonDeClasesServiceCliente = new SalonDeClasesService.Client(SalonDeClasesServiceProtocolo); ChatServiceCliente = new ChatService.Client(ChatServiceProtocolo); PresentacionServiceCliente = new PresentacionService.Client(PresentacionServiceProtocolo); EstaConectado = true; }