Inheritance: System.Collections.CollectionBase
Beispiel #1
0
 /// <summary>
 /// Adds the elements of another SqlConstantCollection to the end of this SqlConstantCollection.
 /// </summary>
 /// <param name="items">
 /// The SqlConstantCollection whose elements are to be added to the end of this SqlConstantCollection.
 /// </param>
 public virtual void AddRange(SqlConstantCollection items)
 {
     foreach (SqlConstant item in items)
     {
         List.Add(item);
     }
 }
		/// <summary>
		/// Creates a SqlConstantCollection from a list of values.
		/// </summary>
		/// <remarks>
		/// The type of SqlConstant items in the collection is determined automatically.
		/// See <see cref="Add"/> method for more info.
		/// </remarks>
		/// <param name="values"></param>
		/// <returns></returns>
		public static SqlConstantCollection FromList(IList values)
		{
			SqlConstantCollection collection = new SqlConstantCollection(values.Count);
			foreach (object val in values)
			{
				collection.Add(val);
			}
			return collection;
		}
Beispiel #3
0
        /// <summary>
        /// Creates a SqlConstantCollection from a list of values.
        /// </summary>
        /// <remarks>
        /// The type of SqlConstant items in the collection is determined automatically.
        /// See <see cref="Add"/> method for more info.
        /// </remarks>
        /// <param name="values"></param>
        /// <returns></returns>
        public static SqlConstantCollection FromList(IList values)
        {
            SqlConstantCollection collection = new SqlConstantCollection(values.Count);

            foreach (object val in values)
            {
                collection.Add(val);
            }
            return(collection);
        }
Beispiel #4
0
        /// <summary>
        /// Creates a WhereTerm which represents SQL NOT IN clause
        /// </summary>
        /// <param name="expr">Expression to be looked up</param>
        /// <param name="values"></param>
        /// <returns></returns>
        public static WhereTerm CreateNotIn(SqlExpression expr, SqlConstantCollection values)
        {
            WhereTerm term = new WhereTerm();

            term.expr1  = expr;
            term.values = values;

            term.type = WhereTermType.NotIn;

            return(term);
        }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the SqlConstantCollection class, containing elements
 /// copied from another instance of SqlConstantCollection
 /// </summary>
 /// <param name="items">
 /// The SqlConstantCollection whose elements are to be added to the new SqlConstantCollection.
 /// </param>
 public SqlConstantCollection(SqlConstantCollection items)
 {
     AddRange(items);
 }
Beispiel #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="collection"></param>
 public Enumerator(SqlConstantCollection collection)
 {
     wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator();
 }
Beispiel #7
0
		/// <summary>
		/// Creates a WhereTerm which represents SQL IN clause
		/// </summary>
		/// <param name="expr">Expression to be looked up</param>
		/// <param name="values">List of values</param>
		/// <returns></returns>
		public static WhereTerm CreateIn(SqlExpression expr, SqlConstantCollection values)
		{
			WhereTerm term = new WhereTerm();
			term.expr1 = expr;
			term.values = values;

			term.type = WhereTermType.In;

			return term;
		}
		/// <summary>
		/// Initializes a new instance of the SqlConstantCollection class, containing elements
		/// copied from another instance of SqlConstantCollection
		/// </summary>
		/// <param name="items">
		/// The SqlConstantCollection whose elements are to be added to the new SqlConstantCollection.
		/// </param>
		public SqlConstantCollection(SqlConstantCollection items)
		{
			AddRange(items);
		}
			/// <summary>
			/// 
			/// </summary>
			/// <param name="collection"></param>
			public Enumerator(SqlConstantCollection collection)
			{
				wrapped = ((System.Collections.CollectionBase) collection).GetEnumerator();
			}
		/// <summary>
		/// Adds the elements of another SqlConstantCollection to the end of this SqlConstantCollection.
		/// </summary>
		/// <param name="items">
		/// The SqlConstantCollection whose elements are to be added to the end of this SqlConstantCollection.
		/// </param>
		public virtual void AddRange(SqlConstantCollection items)
		{
			foreach (SqlConstant item in items)
			{
				List.Add(item);
			}
		}