Exemplo n.º 1
0
        public bool RemoveSession(string sessionId)
        {
            var success = _sessionsRepository.Delete(sessionId);

            SessionRemoved?.Invoke(this, new SessionRemovedEventArgs(sessionId));

            return(success);
        }
Exemplo n.º 2
0
 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}");
 }
Exemplo n.º 3
0
        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);
     }
 }
Exemplo n.º 5
0
 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);
     }
 }
Exemplo n.º 6
0
 public void Apply(SessionRemoved @event)
 {
     State = AccountState.Initialized;
 }