Пример #1
0
        private StandingsHolder CreateStandingsHolder(long sourceEID)
        {
            var holder = new StandingsHolder(sourceEID);

            holder.StandingUpdated += OnStandingUpdated;
            return(holder);
        }
Пример #2
0
        private void OnStandingUpdated(StandingsHolder holder, long targetEID, double standing)
        {
            if (Math.Abs(standing) >= double.Epsilon)
            {
                return;
            }

            holder.Remove(targetEID);
            if (holder.Standings.Count == 0)
            {
                ImmutableInterlocked.TryRemove(ref _standingsHolders, holder.sourceEID, out holder);
            }
        }