AK.F1.Timing.Server.Proxy.ProxySessionManager.ForEachSession C# (CSharp) Метод

ForEachSession() приватный Метод

private ForEachSession ( Action action, bool throwIfCancellationRequested = true ) : void
action Action
throwIfCancellationRequested bool
Результат void
        private void ForEachSession(Action<ProxySession> action, bool throwIfCancellationRequested = true)
        {
            foreach(var session in _sessions.Values)
            {
                if(throwIfCancellationRequested)
                {
                    ThrowIfCancellationRequested();
                }
                if(session.IsDisposed)
                {
                    continue;
                }
                try
                {
                    action(session);
                }
                catch(ObjectDisposedException) { }
            }
        }