예제 #1
0
        public void SubscribeValueChanged()
        {
            ICalcServiceEvents subscriber =
                OperationContext.Current.GetCallbackChannel <ICalcServiceEvents>();

            m_Event3 += subscriber.ValueChanged;
        }
예제 #2
0
        public void SubscribeCalculationFinishedEvent()
        {
            ICalcServiceEvents subscriber =
                OperationContext.Current.GetCallbackChannel <ICalcServiceEvents>();

            m_Event2 += subscriber.CalculationFinished;
        }
예제 #3
0
        //[WebInvoke(Method = "GET",
        //    ResponseFormat = WebMessageFormat.Json,
        //    UriTemplate = "data/{id}")]
        //public Person GetData(string id)
        //{
        //    return new Person()
        //    {
        //        id = Convert.ToInt32(id),
        //        name = "wocao"
        //    };
        //}
        public void SubscribeSentEvent()
        {
            ICalcServiceEvents subscriber =
                OperationContext.Current.GetCallbackChannel <ICalcServiceEvents>();

            m_Event1 += subscriber.Sent;
        }
예제 #4
0
        public void SubscribeUpdateFinishedEvent()
        {
            ICalcServiceEvents subscriber = OperationContext.Current.GetCallbackChannel <ICalcServiceEvents>();

            eventUpdate += subscriber.UpdateFinished;
        }
예제 #5
0
        public void SubscribeDecrEvent()
        {
            ICalcServiceEvents subscriber = OperationContext.Current.GetCallbackChannel <ICalcServiceEvents>();

            eventDecr += subscriber.DecrOp;
        }