public bool RemoveSession(string sessionId) { var success = _sessionsRepository.Delete(sessionId); SessionRemoved?.Invoke(this, new SessionRemovedEventArgs(sessionId)); return(success); }
private void RemoveSession(AudioSessionControl asc) { M.D(22000, "RemoveSession"); //SS.Remove(asc as Session); L.SSD.Remove(L.SSD.FirstOrDefault(s => s.BasePtr == asc.BasePtr)); L.SSN.Remove(asc.DisplayName); SessionRemoved?.Invoke(this, new SessionEventArgs(asc.BasePtr)); M.D(22001, $"# SS:{SS.Count}, SSD:{L.SSD.Count}, SSN:{L.SSN.Count}"); }
public ServiceResult RemoveSession(MudSessionModel session) { if (_Sessions.TryRemove(session)) { SessionRemoved?.Invoke(this, session); } return(new ServiceResult()); }
private void RaiseSessionRemoved(int pid) { if (SynchronizationContext.Current != _synchronizationContext) { _synchronizationContext.Post(o => SessionRemoved?.Invoke(this, pid), null); } else { SessionRemoved?.Invoke(this, pid); } }
private void RaiseSessionRemoved(int id) { if (_stopping) { return; } if (SynchronizationContext.Current != _synchronizationContext) { _synchronizationContext.Post(o => SessionRemoved?.Invoke(this, id), null); } else { SessionRemoved?.Invoke(this, id); } }
public void Apply(SessionRemoved @event) { State = AccountState.Initialized; }