Beispiel #1
0
        //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);
            }
        }
Beispiel #2
0
        //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;
        }
Beispiel #3
0
        //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;
        }