private void Connection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { Debug.WriteLine("Connection service closed"); _connection.RequestReceived -= Connection_RequestReceived; _connection.ServiceClosed -= Connection_ServiceClosed; _connection = null; }
private void Connection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => { Application.Current.Shutdown(); })); }
private void OnServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { _appServiceConnection.RequestReceived -= OnRequestReceived; _appServiceConnection.ServiceClosed -= OnServiceClosed; _appServiceConnection = null; }
public void Connection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { SystrayApplicationContext s = new SystrayApplicationContext(); s.connection.ServiceClosed -= Connection_ServiceClosed; s.connection = null; }
static void OnServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { connection.ServiceClosed -= OnServiceClosed; deferral.Complete(); deferral = null; connection = null; }
/// <summary> /// Occurs when the other endpoint closes the connection to the app service /// </summary> private void OnConnectionClosed(AppServiceConnection sender, AppServiceClosedEventArgs args, int index) { ConnectionDeferral app_dc = null; ConnectionDeferral desktop_dc = null; lock (thisLock) { if (connectionMap.ContainsKey(index)) { app_dc = connectionMap[index]; connectionMap.Remove(index); } if (desktopConnectionMap.ContainsKey(index)) { desktop_dc = desktopConnectionMap[index]; desktopConnectionMap.Remove(index); } if (taskCompletionSourceMap.ContainsKey(index)) { taskCompletionSourceMap[index].TrySetResult(false); } } if (app_dc != null) { app_dc.connection.Dispose(); app_dc.deferral.Complete(); } if (desktop_dc != null) { desktop_dc.connection.Dispose(); desktop_dc.deferral.Complete(); } }
private void Connection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => { _connection?.Dispose(); _connection = null; })); }
private void connectionClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { semaphoreSlim.Wait(); isConnected = false; connection?.Dispose(); setupConnection(); semaphoreSlim.Release(); }
/// <summary> /// Handles the event when the app service connection is closed /// </summary> private void Connection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { // connection to the UWP lost, so we shut down the desktop process Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => { Application.Current.Shutdown(); })); }
private void Connection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { appServiceConnection.RequestReceived -= Connection_RequestReceived; appServiceConnection.ServiceClosed -= Connection_ServiceClosed; appServiceConnection = null; ConnectionClosed?.Invoke(this); }
private void AppServiceconnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { if (_backgroundTaskDeferral != null) { // Complete the service deferral. _backgroundTaskDeferral.Complete(); } }
private void LocalConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { if (localConnection != null) { localConnection.RequestReceived -= OnRequestReceived; localConnection.ServiceClosed -= LocalConnection_ServiceClosed; localConnection = null; } }
private void AppServiceConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { if (_deferral != null) { _deferral.Complete(); } _deferral = null; }
private void RemoteConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { if (remoteConnection != null) { remoteConnection.RequestReceived -= OnRequestReceived; remoteConnection.ServiceClosed -= RemoteConnection_ServiceClosed; remoteConnection = null; } }
private void AppServiceconnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { if (_deferral != null) { // Complete the service deferral. _deferral.Complete(); _deferral = null; } }
private void AppServiceConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { g_AppServiceConnection = null; if (m_AppServiceDeferral != null) { // Complete the service deferral. m_AppServiceDeferral.Complete(); m_AppServiceDeferral = null; } }
private async void OnServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { IsConnected = false; Debug.WriteLine("VoIPConnection.OnServiceClosed()"); try { await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() => await ConnectAsync()); } catch { } }
private async void _connection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { await CoreApplication.MainView.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { if (_connection != null) { _connection.Dispose(); _connection = null; } }); }
private async void OnServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { //Dispose the connection reference we're holding if (CashierServiceConnection != null) { CashierServiceConnection.Dispose(); CashierServiceConnection = null; } }); }
private void AppServiceConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { try { CurrentConnectionIndex = int.Parse(sender.AppServiceName); AppServiceDeferral = AppServiceDeferrals[CurrentConnectionIndex]; AppServiceDeferrals.Remove(CurrentConnectionIndex); if (AppServiceDeferral != null) { AppServiceDeferral.Complete(); AppServiceDeferral = null; } } catch (Exception Ex) { Debug.WriteLine("AppServiceConnection_ServiceClosed error: " + Ex.Message); } }
public static void OnServiceClosed(object sender, AppServiceClosedEventArgs args) { var ctxts = App.Contexts.Where(ctx => ctx.Connection == sender); var ctxt = ctxts.FirstOrDefault(); if (ctxt == null) { return; } try { ctxt.Deferral.Complete(); } catch (Exception) { //ignored } ctxt.DoFinal(); }
private async void OnUnderlyingConnectionClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { switch (args.Status) { case AppServiceClosedStatus.Completed: _disconnectReason = DisconnectReason.RemotePeerDisconnected; break; case AppServiceClosedStatus.Canceled: case AppServiceClosedStatus.ResourceLimitsExceeded: _disconnectReason = DisconnectReason.UnexpectedDisconnect; break; default: _disconnectReason = DisconnectReason.Unknown; break; } await DisposeAsync(); // TODO: Potentially dangerous 'await' in 'async void' method }
/// <summary> /// Occurs when the other endpoint closes the connection to the app service /// </summary> private void AppServiceConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { this.currentConnectionIndex = Int32.Parse(sender.AppServiceName); this.centennialConnection = centennialConnections[this.currentConnectionIndex]; this.centennialConnection.Dispose(); centennialConnections.Remove(this.currentConnectionIndex); this.appServiceDeferral = appServiceDeferrals[this.currentConnectionIndex]; appServiceDeferrals.Remove(this.currentConnectionIndex); this.centennialAppServiceDeferral = centennialAppServiceDeferrals[this.currentConnectionIndex]; centennialAppServiceDeferrals.Remove(this.currentConnectionIndex); if (this.appServiceDeferral != null) { this.appServiceDeferral.Complete(); this.appServiceDeferral = null; } if (this.centennialAppServiceDeferral != null) { this.centennialAppServiceDeferral.Complete(); this.centennialAppServiceDeferral = null; } }
private async void _connection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { await CoreApplication.MainView.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { if (_connection != null) { _connection.Dispose(); _connection = null; } }); }
/// <summary> /// Handler for the Service connection closed event from the AppServiceConnection /// </summary> /// <param name="sender">The AppConnection that is closing (i.e. this pointer)</param> /// <param name="args">any arguments for the service closure (unused)</param> private void ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { _log.Information($"AppService Connection has be closed by: {args.Status.ToString()}"); Connection = null; Status = AppServiceConnectionStatus.Unknown; }
private void AppServiceConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { backgroundTaskDeferral?.Complete(); }
private async void Connection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { //Dispose the connection reference we're holding if (connection != null) { connection.Dispose(); connection = null; } }); }
protected virtual void OnServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { }
private void AppServiceConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { Debug.WriteLine("HttpWebApiService has closed. Status is " + args.Status); }
private void AppConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { _appConnection = null; }
private void connectionServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { isConnected = false; }
private void _appServiceConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { // If the service was closed, restart it _appServiceConnection = null; InitAppSvc(); }
private static void Connection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { // Signal the event so the process can shut down appServiceExit.Set(); }
private void OnServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { new MessageDialog("Service closed").ShowAsync(); }
private void AppConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { _appConnection = null; }
private void Connection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { are.Set(); }
private void AppServiceConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { backgroundTaskDeferral?.Complete(); }
private static void InventoryService_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { m_appServiceExit.Set(); }
private void AppServiceConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { _appServiceDeferral.Complete(); }
private void AppServiceConnection_ServiceClosed(AppServiceConnection sender, AppServiceClosedEventArgs args) { _deferral.Complete(); }