public void Unsubscribe() { //Obtaining the callback channel and remove subscriber from dictionary ServiceCallback = OperationContext.Current.GetCallbackChannel <INotifySubClient>(); subscribers.Remove(ServiceCallback); Console.WriteLine("Unsubscribed"); }
public void Subscribe(SubClientData data) { //Obtaining the callback channel and add subscriber to dictionary ServiceCallback = OperationContext.Current.GetCallbackChannel <INotifySubClient>(); subscribers.Add(ServiceCallback, data); Console.WriteLine("Subscribed"); }