亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? levelcollection.cs

?? 詳細講述了數據庫編程
?? CS
?? 第 1 頁 / 共 2 頁
字號:
#region Copyright & License
//
// Copyright 2001-2005 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion

using System;
using System.Collections;

namespace log4net.Core
{
	/// <summary>
	/// A strongly-typed collection of <see cref="Level"/> objects.
	/// </summary>
	/// <author>Nicko Cadell</author>
	public class LevelCollection : ICollection, IList, IEnumerable, ICloneable
	{
		#region Interfaces

		/// <summary>
		/// Supports type-safe iteration over a <see cref="LevelCollection"/>.
		/// </summary>
		public interface ILevelCollectionEnumerator
		{
			/// <summary>
			/// Gets the current element in the collection.
			/// </summary>
			Level Current { get; }

			/// <summary>
			/// Advances the enumerator to the next element in the collection.
			/// </summary>
			/// <returns>
			/// <c>true</c> if the enumerator was successfully advanced to the next element; 
			/// <c>false</c> if the enumerator has passed the end of the collection.
			/// </returns>
			/// <exception cref="InvalidOperationException">
			/// The collection was modified after the enumerator was created.
			/// </exception>
			bool MoveNext();

			/// <summary>
			/// Sets the enumerator to its initial position, before the first element in the collection.
			/// </summary>
			void Reset();
		}

		#endregion

		private const int DEFAULT_CAPACITY = 16;

		#region Implementation (data)

		private Level[] m_array;
		private int m_count = 0;
		private int m_version = 0;

		#endregion
	
		#region Static Wrappers

		/// <summary>
		/// Creates a read-only wrapper for a <c>LevelCollection</c> instance.
		/// </summary>
		/// <param name="list">list to create a readonly wrapper arround</param>
		/// <returns>
		/// A <c>LevelCollection</c> wrapper that is read-only.
		/// </returns>
		public static LevelCollection ReadOnly(LevelCollection list)
		{
			if(list==null) throw new ArgumentNullException("list");

			return new ReadOnlyLevelCollection(list);
		}

		#endregion

		#region Constructors

		/// <summary>
		/// Initializes a new instance of the <c>LevelCollection</c> class
		/// that is empty and has the default initial capacity.
		/// </summary>
		public LevelCollection()
		{
			m_array = new Level[DEFAULT_CAPACITY];
		}
		
		/// <summary>
		/// Initializes a new instance of the <c>LevelCollection</c> class
		/// that has the specified initial capacity.
		/// </summary>
		/// <param name="capacity">
		/// The number of elements that the new <c>LevelCollection</c> is initially capable of storing.
		/// </param>
		public LevelCollection(int capacity)
		{
			m_array = new Level[capacity];
		}

		/// <summary>
		/// Initializes a new instance of the <c>LevelCollection</c> class
		/// that contains elements copied from the specified <c>LevelCollection</c>.
		/// </summary>
		/// <param name="c">The <c>LevelCollection</c> whose elements are copied to the new collection.</param>
		public LevelCollection(LevelCollection c)
		{
			m_array = new Level[c.Count];
			AddRange(c);
		}

		/// <summary>
		/// Initializes a new instance of the <c>LevelCollection</c> class
		/// that contains elements copied from the specified <see cref="Level"/> array.
		/// </summary>
		/// <param name="a">The <see cref="Level"/> array whose elements are copied to the new list.</param>
		public LevelCollection(Level[] a)
		{
			m_array = new Level[a.Length];
			AddRange(a);
		}

		/// <summary>
		/// Initializes a new instance of the <c>LevelCollection</c> class
		/// that contains elements copied from the specified <see cref="Level"/> collection.
		/// </summary>
		/// <param name="col">The <see cref="Level"/> collection whose elements are copied to the new list.</param>
		public LevelCollection(ICollection col)
		{
			m_array = new Level[col.Count];
			AddRange(col);
		}
		
		/// <summary>
		/// Type visible only to our subclasses
		/// Used to access protected constructor
		/// </summary>
		protected internal enum Tag 
		{
			/// <summary>
			/// A value
			/// </summary>
			Default
		}

		/// <summary>
		/// Allow subclasses to avoid our default constructors
		/// </summary>
		/// <param name="tag"></param>
		protected internal LevelCollection(Tag tag)
		{
			m_array = null;
		}
		#endregion
		
		#region Operations (type-safe ICollection)

		/// <summary>
		/// Gets the number of elements actually contained in the <c>LevelCollection</c>.
		/// </summary>
		public virtual int Count
		{
			get { return m_count; }
		}

		/// <summary>
		/// Copies the entire <c>LevelCollection</c> to a one-dimensional
		/// <see cref="Level"/> array.
		/// </summary>
		/// <param name="array">The one-dimensional <see cref="Level"/> array to copy to.</param>
		public virtual void CopyTo(Level[] array)
		{
			this.CopyTo(array, 0);
		}

		/// <summary>
		/// Copies the entire <c>LevelCollection</c> to a one-dimensional
		/// <see cref="Level"/> array, starting at the specified index of the target array.
		/// </summary>
		/// <param name="array">The one-dimensional <see cref="Level"/> array to copy to.</param>
		/// <param name="start">The zero-based index in <paramref name="array"/> at which copying begins.</param>
		public virtual void CopyTo(Level[] array, int start)
		{
			if (m_count > array.GetUpperBound(0) + 1 - start)
			{
				throw new System.ArgumentException("Destination array was not long enough.");
			}
			
			Array.Copy(m_array, 0, array, start, m_count); 
		}

		/// <summary>
		/// Gets a value indicating whether access to the collection is synchronized (thread-safe).
		/// </summary>
		/// <value>true if access to the ICollection is synchronized (thread-safe); otherwise, false.</value>
		public virtual bool IsSynchronized
		{
			get { return m_array.IsSynchronized; }
		}

		/// <summary>
		/// Gets an object that can be used to synchronize access to the collection.
		/// </summary>
		public virtual object SyncRoot
		{
			get { return m_array.SyncRoot; }
		}

		#endregion
		
		#region Operations (type-safe IList)

		/// <summary>
		/// Gets or sets the <see cref="Level"/> at the specified index.
		/// </summary>
		/// <param name="index">The zero-based index of the element to get or set.</param>
		/// <exception cref="ArgumentOutOfRangeException">
		/// <para><paramref name="index"/> is less than zero</para>
		/// <para>-or-</para>
		/// <para><paramref name="index"/> is equal to or greater than <see cref="LevelCollection.Count"/>.</para>
		/// </exception>
		public virtual Level this[int index]
		{
			get
			{
				ValidateIndex(index); // throws
				return m_array[index]; 
			}
			set
			{
				ValidateIndex(index); // throws
				++m_version; 
				m_array[index] = value; 
			}
		}

		/// <summary>
		/// Adds a <see cref="Level"/> to the end of the <c>LevelCollection</c>.
		/// </summary>
		/// <param name="item">The <see cref="Level"/> to be added to the end of the <c>LevelCollection</c>.</param>
		/// <returns>The index at which the value has been added.</returns>
		public virtual int Add(Level item)
		{
			if (m_count == m_array.Length)
			{
				EnsureCapacity(m_count + 1);
			}

			m_array[m_count] = item;
			m_version++;

			return m_count++;
		}
		
		/// <summary>
		/// Removes all elements from the <c>LevelCollection</c>.
		/// </summary>
		public virtual void Clear()
		{
			++m_version;
			m_array = new Level[DEFAULT_CAPACITY];
			m_count = 0;
		}
		
		/// <summary>
		/// Creates a shallow copy of the <see cref="LevelCollection"/>.
		/// </summary>
		/// <returns>A new <see cref="LevelCollection"/> with a shallow copy of the collection data.</returns>
		public virtual object Clone()
		{
			LevelCollection newCol = new LevelCollection(m_count);
			Array.Copy(m_array, 0, newCol.m_array, 0, m_count);
			newCol.m_count = m_count;
			newCol.m_version = m_version;

			return newCol;
		}

		/// <summary>
		/// Determines whether a given <see cref="Level"/> is in the <c>LevelCollection</c>.
		/// </summary>
		/// <param name="item">The <see cref="Level"/> to check for.</param>
		/// <returns><c>true</c> if <paramref name="item"/> is found in the <c>LevelCollection</c>; otherwise, <c>false</c>.</returns>
		public virtual bool Contains(Level item)
		{
			for (int i=0; i != m_count; ++i)
			{
				if (m_array[i].Equals(item))
				{
					return true;
				}
			}
			return false;
		}

		/// <summary>
		/// Returns the zero-based index of the first occurrence of a <see cref="Level"/>
		/// in the <c>LevelCollection</c>.
		/// </summary>
		/// <param name="item">The <see cref="Level"/> to locate in the <c>LevelCollection</c>.</param>
		/// <returns>
		/// The zero-based index of the first occurrence of <paramref name="item"/> 
		/// in the entire <c>LevelCollection</c>, if found; otherwise, -1.
		///	</returns>
		public virtual int IndexOf(Level item)
		{
			for (int i=0; i != m_count; ++i)
			{
				if (m_array[i].Equals(item))
				{
					return i;
				}
			}
			return -1;
		}

		/// <summary>
		/// Inserts an element into the <c>LevelCollection</c> at the specified index.
		/// </summary>
		/// <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
		/// <param name="item">The <see cref="Level"/> to insert.</param>
		/// <exception cref="ArgumentOutOfRangeException">
		/// <para><paramref name="index"/> is less than zero</para>
		/// <para>-or-</para>
		/// <para><paramref name="index"/> is equal to or greater than <see cref="LevelCollection.Count"/>.</para>
		/// </exception>
		public virtual void Insert(int index, Level item)
		{
			ValidateIndex(index, true); // throws
			
			if (m_count == m_array.Length)
			{
				EnsureCapacity(m_count + 1);
			}

			if (index < m_count)
			{
				Array.Copy(m_array, index, m_array, index + 1, m_count - index);
			}

			m_array[index] = item;
			m_count++;
			m_version++;
		}

		/// <summary>
		/// Removes the first occurrence of a specific <see cref="Level"/> from the <c>LevelCollection</c>.
		/// </summary>
		/// <param name="item">The <see cref="Level"/> to remove from the <c>LevelCollection</c>.</param>
		/// <exception cref="ArgumentException">
		/// The specified <see cref="Level"/> was not found in the <c>LevelCollection</c>.
		/// </exception>
		public virtual void Remove(Level item)
		{		   
			int i = IndexOf(item);
			if (i < 0)
			{
				throw new System.ArgumentException("Cannot remove the specified item because it was not found in the specified Collection.");
			}
			
			++m_version;
			RemoveAt(i);
		}

		/// <summary>
		/// Removes the element at the specified index of the <c>LevelCollection</c>.
		/// </summary>
		/// <param name="index">The zero-based index of the element to remove.</param>
		/// <exception cref="ArgumentOutOfRangeException">
		/// <para><paramref name="index"/> is less than zero</para>
		/// <para>-or-</para>
		/// <para><paramref name="index"/> is equal to or greater than <see cref="LevelCollection.Count"/>.</para>
		/// </exception>
		public virtual void RemoveAt(int index)
		{
			ValidateIndex(index); // throws
			
			m_count--;

			if (index < m_count)
			{
				Array.Copy(m_array, index + 1, m_array, index, m_count - index);
			}
			
			// We can't set the deleted entry equal to null, because it might be a value type.
			// Instead, we'll create an empty single-element array of the right type and copy it 
			// over the entry we want to erase.
			Level[] temp = new Level[1];
			Array.Copy(temp, 0, m_array, m_count, 1);
			m_version++;
		}

		/// <summary>
		/// Gets a value indicating whether the collection has a fixed size.
		/// </summary>
		/// <value>true if the collection has a fixed size; otherwise, false. The default is false</value>
		public virtual bool IsFixedSize
		{
			get { return false; }
		}

		/// <summary>
		/// Gets a value indicating whether the IList is read-only.
		/// </summary>
		/// <value>true if the collection is read-only; otherwise, false. The default is false</value>
		public virtual bool IsReadOnly
		{
			get { return false; }
		}

		#endregion

		#region Operations (type-safe IEnumerable)
		
		/// <summary>
		/// Returns an enumerator that can iterate through the <c>LevelCollection</c>.
		/// </summary>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产色一区二区| 一卡二卡欧美日韩| 日韩一区二区免费视频| 91网站在线播放| 国产成人精品免费看| 美国精品在线观看| 丝袜美腿亚洲综合| 亚洲国产一区二区视频| 欧美大片免费久久精品三p| 欧美疯狂做受xxxx富婆| 一本大道久久精品懂色aⅴ| 成人午夜激情片| 风间由美一区二区三区在线观看 | 国产视频911| 久久美女艺术照精彩视频福利播放| 欧美二区在线观看| 欧美偷拍一区二区| 国产精品69毛片高清亚洲| 日产国产欧美视频一区精品| 天堂精品中文字幕在线| 亚洲成人精品一区| 日韩中文字幕亚洲一区二区va在线| 亚洲一区二区三区视频在线 | 欧美综合视频在线观看| 91丨九色丨黑人外教| 不卡一区二区三区四区| 91亚洲精品久久久蜜桃| 色婷婷久久久亚洲一区二区三区| 99精品久久免费看蜜臀剧情介绍| www.亚洲人| 一本到三区不卡视频| 欧美亚洲日本国产| 欧美日本乱大交xxxxx| 欧美丰满一区二区免费视频 | 亚洲在线视频免费观看| 天堂精品中文字幕在线| 精品一区二区三区的国产在线播放| 国产自产视频一区二区三区| 国产福利一区在线观看| 91一区二区三区在线观看| 欧美亚洲一区三区| 日韩三级视频在线看| 久久综合久久99| 国产精品成人免费| 樱花影视一区二区| 奇米色一区二区| 国产精品一级黄| 99这里只有久久精品视频| 在线欧美一区二区| 91精品国产91热久久久做人人| 精品国产乱码久久久久久1区2区 | 欧美中文字幕一区二区三区亚洲| 在线观看三级视频欧美| 91精品国产综合久久精品麻豆 | 五月婷婷久久综合| 国模套图日韩精品一区二区 | 粉嫩绯色av一区二区在线观看| 成人激情小说网站| 色欧美乱欧美15图片| 51精品秘密在线观看| 精品国产青草久久久久福利| 亚洲欧洲美洲综合色网| 天天综合色天天| 国产高清一区日本| 欧美色网站导航| 久久色视频免费观看| 一区二区免费在线播放| 九色porny丨国产精品| 91免费小视频| 日韩天堂在线观看| 综合久久久久久| 秋霞成人午夜伦在线观看| www.日韩大片| 精品国内片67194| 一区二区视频在线| 国产伦精品一区二区三区视频青涩| 色婷婷综合久色| 久久综合精品国产一区二区三区| 一二三四区精品视频| 国产一区二区不卡| 5566中文字幕一区二区电影| 亚洲色图丝袜美腿| 国产精品一区二区果冻传媒| 欧美在线视频你懂得| 久久精品视频在线看| 婷婷国产在线综合| 99这里都是精品| 久久久久国产成人精品亚洲午夜| 亚洲不卡av一区二区三区| aaa欧美大片| 国产三级一区二区| 日韩av网站免费在线| 欧美在线播放高清精品| 中文字幕免费不卡在线| 久久av中文字幕片| 欧美区一区二区三区| 亚洲色欲色欲www| 国产.欧美.日韩| 欧美精品一区二区久久婷婷| 亚洲不卡在线观看| 91理论电影在线观看| 中日韩av电影| 国产精品一区二区三区四区| 日韩欧美亚洲一区二区| 日本午夜精品视频在线观看| 欧美自拍丝袜亚洲| 亚洲猫色日本管| 91在线porny国产在线看| 国产精品乱码一区二区三区软件| 国产综合色精品一区二区三区| 日韩一区二区三区四区五区六区 | 最新日韩av在线| 粗大黑人巨茎大战欧美成人| 精品精品国产高清a毛片牛牛| 蜜臀av性久久久久蜜臀aⅴ流畅| 欧美日韩一区在线观看| 一区二区不卡在线播放 | 樱花草国产18久久久久| 色综合久久天天综合网| |精品福利一区二区三区| 色综合色狠狠天天综合色| 亚洲视频一区二区在线| 色婷婷av一区二区三区大白胸| 久久免费看少妇高潮| 日本vs亚洲vs韩国一区三区二区| 欧美视频精品在线| 国产精品久久久久久久浪潮网站 | 精品久久久久久亚洲综合网| 老司机精品视频线观看86| 日韩视频一区二区在线观看| 日本成人中文字幕| 精品美女一区二区三区| 国内精品伊人久久久久av一坑| 久久久不卡网国产精品一区| 奇米亚洲午夜久久精品| 精品国产一区二区精华| 国产成人自拍高清视频在线免费播放 | 一本一本大道香蕉久在线精品 | 午夜欧美一区二区三区在线播放| 在线不卡欧美精品一区二区三区| 日本特黄久久久高潮 | 最新不卡av在线| 色哟哟国产精品| 日韩国产欧美在线观看| 精品电影一区二区| 99视频精品全部免费在线| 一区二区三区.www| 欧美成人一区二区三区在线观看 | 99精品桃花视频在线观看| 亚洲精品乱码久久久久久久久 | 日韩欧美区一区二| 国产福利一区二区三区视频| 亚洲欧洲日本在线| 欧美精品一二三区| 国产精品中文有码| 亚洲视频 欧洲视频| 欧美久久婷婷综合色| 国产一区二区美女| 亚洲欧洲日韩在线| 制服丝袜av成人在线看| 国产精品资源网| 一区二区三区四区不卡视频 | 日韩欧美色电影| 99久久久久免费精品国产| 水野朝阳av一区二区三区| 久久综合视频网| 在线视频中文字幕一区二区| 日本三级亚洲精品| 日本一二三四高清不卡| 91免费看片在线观看| 丝袜美腿成人在线| 国产精品妹子av| 91精品国产色综合久久| 精品中文字幕一区二区小辣椒| 久久久久成人黄色影片| 精品视频在线免费观看| 国产精品主播直播| 日韩精品电影一区亚洲| 国产精品国产三级国产三级人妇| 欧美亚洲动漫制服丝袜| 久久99国产精品成人| 亚洲猫色日本管| 久久久一区二区三区捆绑**| 欧洲国产伦久久久久久久| 成人av小说网| 粉嫩av亚洲一区二区图片| 黄网站免费久久| 美国十次了思思久久精品导航| 亚洲国产日韩精品| 一区二区三区视频在线观看 | 成人性生交大片免费看视频在线| 久久99国产精品久久99果冻传媒| 日本中文在线一区| 亚洲成a人片在线不卡一二三区| 国产精品初高中害羞小美女文| 久久蜜桃av一区二区天堂| 久久久五月婷婷| 精品国产sm最大网站| 欧美成人bangbros| 日韩写真欧美这视频|