public static QueueBuffer[] CopyQueueBuffersToArray(this Dictionary <Guid, IQueueBuffer> queueBuffers)
        {
            QueueBuffer[] buffers = null;

            var queueCount = queueBuffers.Count;

            buffers = new QueueBuffer[queueCount];
            int index = 0;

            foreach (IQueueBuffer queueBuffer in queueBuffers.Values)
            {
                buffers[index++] = new QueueBuffer(queueBuffer.Priority, queueBuffer.Buffer());
            }

            return(buffers);
        }
예제 #2
0
        public QueueBuffer[] ThreadsafeCopyBuffersToArray(List <IQueueBuffer> queueBuffers)
        {
            QueueBuffer[] buffers = null;

            var queueCount = queueBuffers.Count;

            buffers = new QueueBuffer[queueCount];
            int index = 0;

            foreach (IQueueBuffer queueBuffer in queueBuffers)
            {
                byte?[] buff = SafeRequestDMX(queueBuffer);

                buffers[index++] = new QueueBuffer(queueBuffer.Priority, buff);
            }

            return(buffers);
        }