ActivityStreams.Persistence.DefaultActivityRepository.FetchNextActivity C# (CSharp) Метод

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

Gets the first activity from the specified stream and places it into the specified buffer.
private FetchNextActivity ( Dictionary snapshot, byte streamId, SortedSet buffer ) : void
snapshot Dictionary
streamId byte
buffer SortedSet
Результат void
        void FetchNextActivity(Dictionary<byte[], Queue<Activity>> snapshot, byte[] streamId, SortedSet<Activity> buffer)
        {
            Queue<Activity> streamQueue;
            if (snapshot.TryGetValue(streamId, out streamQueue))
            {
                if (streamQueue.Count > 0)
                {
                    var candidate = streamQueue.Dequeue();
                    buffer.Add(candidate);
                }
            }
        }