Beispiel #1
0
        /// <summary>
        /// 복제 생성자
        /// </summary>
        /// <param name="ringLogger"></param>
        public RingLogger(RingLogger <T> ringLogger)
            : this(ringLogger._Capacity)
        {
            m_Pos = ringLogger.m_Pos;

            if (EventAddRecode != null)
            {
                EventAddRecode = (EventHandler <T>)ringLogger.EventAddRecode.Clone();
            }
            else
            {
                EventAddRecode = null;
            }

            Array.Copy(ringLogger.m_RecodeArray, this.m_RecodeArray, this._Capacity);
        }
Beispiel #2
0
            public RingLoggerEnumerator(RingLogger <T> ringLogger)
            {
                m_RingLogger = new RingLogger <T>(ringLogger);
                m_Capacity   = ringLogger._Capacity;


                int index = NextPos(m_RingLogger.m_Pos);

                //반복 목표 횟수 계산
                if ((m_RingLogger.m_RecodeArray[index] == null))
                {
                    m_TargetCount = m_RingLogger.m_Pos + 1;
                    m_Pos         = -1;
                }
                else
                {
                    m_TargetCount = m_Capacity;
                    m_Pos         = m_RingLogger.m_Pos;
                }

                m_Count = 0;
            }