Ejemplo n.º 1
0
        /// <summary>
        ///		Converts the array of integer values to a <c>PaymentTypeCollection</c>.
        /// </summary>
        /// <param name="x"></param>
        /// <returns></returns>
        public static PaymentTypeCollection ConvertToCollection(int[] x)
        {
            PaymentTypeCollection types = new PaymentTypeCollection(x.Length);

            for (int i = 0; i < x.Length; i++)
            {
                types.Add((ePaymentType)x[i]);
            }
            return(types);
        }
Ejemplo n.º 2
0
            public override int Add(ePaymentType x)
            {
                int result = 0;

                rwLock.AcquireWriterLock(timeout);

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

                return(result);
            }