internal static void Initialize(string callBackReceiverAddress, string currentTaskToken) { EndpointAddress endpointAddress = new EndpointAddress(callBackReceiverAddress); NetNamedPipeBinding binding = new NetNamedPipeBinding(); receiver = ChannelFactory <ITaskCallbackReceiver> .CreateChannel(binding, endpointAddress); taskToken = currentTaskToken; }
private static void TryUpdateProgress(UpdatingTaskProgressEventArgs e) { try { if (receiver != null) { receiver.UpdateProgress(e); } } catch { receiver = null; } }