Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Core;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.ServiceModel;
- using System.Text;
- using System.Threading.Tasks;
- namespace Alarm_Display
- {
- class Program
- {
- public class SubscriberCallBack : CoreReference.IAlarmCallback
- {
- public void AlarmHappened(Alarm a)
- {
- Console.WriteLine(a);
- }
- }
- static void Main(string[] args)
- {
- Console.Write("Press ENTER to start reading: ");
- Console.ReadLine();
- InstanceContext ic = new InstanceContext(new SubscriberCallBack());
- CoreReference.AlarmClient proxy = new CoreReference.AlarmClient(ic);
- proxy.Subscribe();
- Console.ReadLine();
- proxy.Unsubscribe();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement