/// <summary> /// Adds a set of SqlStatementParameter instances to the collection. /// </summary> /// <param name="item">The item to add.</param> public void AddRange(SqlStatementParameterCollection items) { if (items == null) { throw new ArgumentNullException("items"); } for (int index = 0; index < items.Count; index++) { Add(items[index]); } }
/// <summary> /// Gets data for serialization. /// </summary> /// <param name="info"></param> /// <param name="context"></param> private SqlStatement(SerializationInfo info, StreamingContext context) { if (info == null) { throw new ArgumentNullException("info"); } // get... Type dialectType = (Type)info.GetValue("_dialectType", typeof(Type)); if (dialectType != null) { _dialect = (SqlDialect)Activator.CreateInstance(dialectType); } // get... _databaseName = info.GetString("_databaseName"); _parameters = (SqlStatementParameterCollection)info.GetValue("_parameters", typeof(SqlStatementParameterCollection)); _commandText = info.GetString("_commandText"); _commandType = (CommandType)info.GetValue("_commandType", typeof(CommandType)); _selectMap = (SelectMap)info.GetValue("_selectMap", typeof(SelectMap)); this.Tag = (string)info.GetValue("Tag", typeof(string)); this.ArrayParameterType = (ArrayParameterType)info.GetValue("ArrayParameterType", typeof(ArrayParameterType)); }