public static Framework.UniqueQueue <T> EnqueueRange <T>(this Framework.UniqueQueue <T> queue, IEnumerable <T> range) { foreach (T @object in range) { queue.Enqueue(@object); } return(queue); }
public EventQueue(int startPoolSize = 10, int maxPoolSize = 100) { _type = typeof(TEvent); _maxPoolSize = maxPoolSize; _pool = new UniqueQueue <TEvent>(startPoolSize); _queue = new UniqueQueue <TEvent>(); _postEvents = new List <PostEvent>(); _fields.AddRange(_type.GetFields()); }