Пример #1
0
 public static ServiceLiveClient Subscribe(MainViewModel mainViewModel)
 {
     ServiceLiveClient serviceLive = null;
     try
     {
         System.ServiceModel.InstanceContext context = new System.ServiceModel.InstanceContext(new ServiceLiveCallbackHandler(mainViewModel));
         serviceLive = new ServiceLiveClient(context);
         serviceLive.Subscribe();
     }
     catch (Exception) { }
     return serviceLive;
 }
Пример #2
0
 public static void Subscribe(ObservableCollection<KeyValuePair<DateTime, double>> heartQueue,
                              ObservableCollection<KeyValuePair<DateTime, double>> tempQueue)
 {
     try
     {
         _callBack = new InstanceContext(new CallbackHandler(heartQueue, tempQueue));
         _serviceLive = new ServiceLiveClient(_callBack);
         _serviceLive.Subscribe();
     }
     catch (Exception)
     {
         _callBack = null;
         _serviceLive = null;
     }
 }
Пример #3
0
 public ServiceLiveManager(IServiceLiveCallback i)
 {
     this._ic     = new InstanceContext(i);
     this._client = new ServiceLiveClient(this._ic);
 }
Пример #4
0
 public ServiceLiveManager(IServiceLiveCallback i)
 {
     this._ic = new InstanceContext(i);
     this._client = new ServiceLiveClient(this._ic);
 }