/// <summary> /// Disconnect Account from server. /// </summary> /// <param name="accountName">Account who wants to disconnect.</param> public void DisconnectAccount(string accountName) { try { ConnectedAccounts.Remove(accountName); Logger.Log.DebugFormat($"[WCF] Account {accountName} has been disconnected."); } catch (Exception ex) { Logger.Log.Error("General Error", ex); } }
/// <summary> /// Disconnect Account from server. /// </summary> /// <param name="accountName">Account who wants to disconnect.</param> public void DisconnectAccount(string accountName) { try { ConnectedAccounts.Remove(accountName); // inform clients ICommunicationCallback callback = OperationContext.Current.GetCallbackChannel <ICommunicationCallback>(); callback.DisconnectAccountCallback(accountName); Logger.Log.DebugFormat($"[WCF] Account {accountName} has been disconnected."); } catch (Exception ex) { Logger.Log.Error("General Error", ex); } }