/// <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) { this.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); }
/// <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); }
/// <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(FilterCompositionLogicalOperator relationship, SqlExpression expr, SqlConstantCollection values) { WhereTerm term = CreateNotIn(expr, values); term._Relationship = relationship; 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) { this.AddRange(items); }
/// <summary> /// /// </summary> /// <param name="collection"></param> public Enumerator(SqlConstantCollection collection) { this.wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator(); }