//Clients call this service operation to subscribe. //A price change event handler is registered for this client instance. //public void Subscribe() public bool Subscribe(string userName, string password) { if (userName == "umerazizmalik" && password == "abdulaziz") { callback = OperationContext.Current.GetCallbackChannel <ISampleClientContract>(); priceChangeHandler = new PriceChangeEventHandler(PriceChangeHandler); PriceChangeEvent += priceChangeHandler; return(true); } else { return(false); } }
//Clients call this service operation to subscribe. //A price change event handler is registered for this client instance. public void Subscribe() { callback = OperationContext.Current.GetCallbackChannel<ISampleClientContract>(); priceChangeHandler = new PriceChangeEventHandler(PriceChangeHandler); PriceChangeEvent += priceChangeHandler; }
//Clients call this service operation to subscribe. //A price change event handler is registered for this client instance. public void Subscribe() { callback = OperationContext.Current.GetCallbackChannel <ISampleClientContract>(); priceChangeHandler = new PriceChangeEventHandler(PriceChangeHandler); PriceChangeEvent += priceChangeHandler; }