public NotificationServiceHandler() { _notificationServiceCallback = new NotificationServiceCallback(); _notificationServiceCallback.ClientNotified += NotificationServiceCallback_ClientNotified; _notificationServiceClient = new ServerDuplexContract(); //TODO: Fix //_clientId = _notificationServiceClient.Subscribe(); }
protected void Page_Load(object sender, EventArgs e) { ticketsService = new TicketsService.TicketsServiceClient(); NotificationServiceCallback notificationServiceCallback = new NotificationServiceCallback(); notificationServiceCallback.UserNotifiedEvent += UserNotified_Handler; instanceContext = new InstanceContext(notificationServiceCallback); notificationServiceClient = new NotificationServiceClient(instanceContext); try { userId = notificationServiceClient.Subscribe(); } catch { Console.WriteLine("ERROR: notificationServiceClient.Subscribe()"); } LoadWorkers(); if (!Page.IsPostBack) { UpdateWorkersList(); } if (workersList != null) { if (workersList.Count > 0) { UpdateQuestionsListBox(workersList[workersDropDownList.SelectedIndex].id); } } //TODO remover, Isto é para DEBUG //DebugLabel.Text = ticketsService.DebugTests(); }