Пример #1
0
        /// <summary>
        ///		Adds the elements of another <c>PreviousPaymentCollection</c> to the current <c>PreviousPaymentCollection</c>.
        /// </summary>
        /// <param name="x">The <c>PreviousPaymentCollection</c> whose elements should be added to the end of the current <c>PreviousPaymentCollection</c>.</param>
        /// <returns>The new <see cref="PreviousPaymentCollection.Count"/> of the <c>PreviousPaymentCollection</c>.</returns>
        public virtual int AddRange(PreviousPaymentCollection x)
        {
            if (m_count + x.Count >= m_array.Length)
            {
                EnsureCapacity(m_count + x.Count);
            }

            Array.Copy(x.m_array, 0, m_array, m_count, x.Count);
            m_count += x.Count;
            m_version++;

            return(m_count);
        }
Пример #2
0
            public override int AddRange(PreviousPaymentCollection x)
            {
                int result = 0;

                rwLock.AcquireWriterLock(timeout);

                try
                {
                    result = collection.AddRange(x);
                }
                finally
                {
                    rwLock.ReleaseWriterLock();
                }

                return(result);
            }
Пример #3
0
 internal SyncPreviousPaymentCollection(PreviousPaymentCollection list) : base(Tag.Default)
 {
     rwLock     = new System.Threading.ReaderWriterLock();
     collection = list;
 }
Пример #4
0
 /// <summary>
 ///		Initializes a new instance of the <c>Enumerator</c> class.
 /// </summary>
 /// <param name="tc"></param>
 internal Enumerator(PreviousPaymentCollection tc)
 {
     m_collection = tc;
     m_index      = -1;
     m_version    = tc.m_version;
 }
Пример #5
0
 /// <summary>
 ///		Initializes a new instance of the <c>PreviousPaymentCollection</c> class
 ///		that contains elements copied from the specified <c>PreviousPaymentCollection</c>.
 /// </summary>
 /// <param name="c">The <c>PreviousPaymentCollection</c> whose elements are copied to the new collection.</param>
 public PreviousPaymentCollection(PreviousPaymentCollection c)
 {
     m_array = new PreviousPayment[c.Count];
     AddRange(c);
 }
Пример #6
0
 public override int AddRange(PreviousPaymentCollection x)
 {
     throw new NotSupportedException("This is a Read Only Collection and can not be modified");
 }
Пример #7
0
 internal ReadOnlyPreviousPaymentCollection(PreviousPaymentCollection list) : base(Tag.Default)
 {
     m_collection = list;
 }