aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Sqlite/SQLiteExtensions.cs
diff options
context:
space:
mode:
authorLukePulverenti <luke.pulverenti@gmail.com>2013-02-24 16:53:54 -0500
committerLukePulverenti <luke.pulverenti@gmail.com>2013-02-24 16:53:54 -0500
commit8ce3e74e8112a94773df22827849bf274fc88198 (patch)
treea4ce1edf34466be697e2e432609f6be80b6c6df6 /MediaBrowser.Server.Sqlite/SQLiteExtensions.cs
parent6c86721f6de2acbe68e9419064ff21111ff3a223 (diff)
More DI
Diffstat (limited to 'MediaBrowser.Server.Sqlite/SQLiteExtensions.cs')
-rw-r--r--MediaBrowser.Server.Sqlite/SQLiteExtensions.cs61
1 files changed, 0 insertions, 61 deletions
diff --git a/MediaBrowser.Server.Sqlite/SQLiteExtensions.cs b/MediaBrowser.Server.Sqlite/SQLiteExtensions.cs
deleted file mode 100644
index f9f79a8b7..000000000
--- a/MediaBrowser.Server.Sqlite/SQLiteExtensions.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using System;
-using System.Data;
-using System.Data.SQLite;
-
-namespace MediaBrowser.Server.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;
- }
- }
-}