diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 23:37:50 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 23:37:50 -0500 |
| commit | a5f9dc1bfc6c8d37f915d2ea33e495013bd83ba5 (patch) | |
| tree | 960cabedfbd07fe4eac3503e99f8bab745db58e2 /MediaBrowser.Controller/Persistence/SQLite/SQLiteExtensions.cs | |
| parent | 509156cbc3497ff8daabefd3dba843f5b085701a (diff) | |
isolated sqlite dependancy
Diffstat (limited to 'MediaBrowser.Controller/Persistence/SQLite/SQLiteExtensions.cs')
| -rw-r--r-- | MediaBrowser.Controller/Persistence/SQLite/SQLiteExtensions.cs | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/MediaBrowser.Controller/Persistence/SQLite/SQLiteExtensions.cs b/MediaBrowser.Controller/Persistence/SQLite/SQLiteExtensions.cs deleted file mode 100644 index f1ed77492..000000000 --- a/MediaBrowser.Controller/Persistence/SQLite/SQLiteExtensions.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Data; -using System.Data.SQLite; - -namespace MediaBrowser.Controller.Persistence.SQLite -{ - /// <summary> - /// Class SQLiteExtensions - /// </summary> - static class SQLiteExtensions - { - /// <summary> - /// Adds the param. - /// </summary> - /// <param name="cmd">The CMD.</param> - /// <param name="param">The param.</param> - /// <returns>SQLiteParameter.</returns> - /// <exception cref="System.ArgumentNullException"></exception> - public static SQLiteParameter AddParam(this SQLiteCommand cmd, string param) - { - if (string.IsNullOrEmpty(param)) - { - throw new ArgumentNullException(); - } - - var sqliteParam = new SQLiteParameter(param); - cmd.Parameters.Add(sqliteParam); - return sqliteParam; - } - - /// <summary> - /// Adds the param. - /// </summary> - /// <param name="cmd">The CMD.</param> - /// <param name="param">The param.</param> - /// <param name="data">The data.</param> - /// <returns>SQLiteParameter.</returns> - /// <exception cref="System.ArgumentNullException"></exception> - public static SQLiteParameter AddParam(this SQLiteCommand cmd, string param, object data) - { - if (string.IsNullOrEmpty(param)) - { - throw new ArgumentNullException(); - } - - var sqliteParam = AddParam(cmd, param); - sqliteParam.Value = data; - return sqliteParam; - } - - /// <summary> - /// Determines whether the specified conn is open. - /// </summary> - /// <param name="conn">The conn.</param> - /// <returns><c>true</c> if the specified conn is open; otherwise, <c>false</c>.</returns> - public static bool IsOpen(this SQLiteConnection conn) - { - return conn.State == ConnectionState.Open; - } - } -} |
