1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using System;
- using System.Collections;
- namespace System.Data.SQLiteClient
- {
- public class SQLiteCommandCollection : CollectionBase, IDisposable
- {
- public SQLiteCommandCollection()
- {
- }
- public void Add(SQLiteCommand command)
- {
- List.Add(command);
- }
- public void Remove(SQLiteCommand command)
- {
- List.Remove(command);
- }
- public SQLiteCommand this[int index]
- {
- get
- {
- if (index < 0 || index >= Count) throw new IndexOutOfRangeException();
- return List[index] as SQLiteCommand;
- }
- }
- #region IDisposable Members
- public void Dispose()
- {
- for (int i = 0; i < Count; ++i)
- {
- SQLiteCommand command = this[i];
- command.Dispose();
- }
- }
- #endregion
- }
- }
|