Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Event optimizations using generics |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | sourceforge |
Files: | files | file ages | folders |
SHA1: |
1b0be7f4087e574c831731c2615fa01e |
User & Date: | rmsimpson 2005-08-17 21:13:05.000 |
Context
2005-08-17
| ||
21:14 | Globalization updates check-in: d54fc9e9fb user: rmsimpson tags: sourceforge | |
21:13 | Event optimizations using generics check-in: 1b0be7f408 user: rmsimpson tags: sourceforge | |
2005-08-16
| ||
19:12 | 1.0.14 check-in: 4453746b7a user: rmsimpson tags: sourceforge | |
Changes
Changes to System.Data.SQLite/SQLiteCommandBuilder.cs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; using System.Data; using System.Data.Common; /// <summary> /// SQLite implementation of DbCommandBuilder. /// </summary> public sealed class SQLiteCommandBuilder : DbCommandBuilder { | > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; using System.Data; using System.Data.Common; using System.Globalization; /// <summary> /// SQLite implementation of DbCommandBuilder. /// </summary> public sealed class SQLiteCommandBuilder : DbCommandBuilder { private EventHandler<RowUpdatingEventArgs> _handler; /// <summary> /// Default constructor /// </summary> public SQLiteCommandBuilder() { } |
︙ | ︙ | |||
53 54 55 56 57 58 59 | /// <summary> /// Not implemented. /// </summary> /// <param name="parameterName">The name of the parameter</param> /// <returns>Error</returns> protected override string GetParameterName(string parameterName) { | | | > | | | | < | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | /// <summary> /// Not implemented. /// </summary> /// <param name="parameterName">The name of the parameter</param> /// <returns>Error</returns> protected override string GetParameterName(string parameterName) { return String.Format(CultureInfo.InvariantCulture, "${0}", parameterName); } /// <summary> /// Not implemented. /// </summary> /// <param name="parameterOrdinal">The i of the parameter</param> /// <returns>Error</returns> protected override string GetParameterName(int parameterOrdinal) { return String.Format(CultureInfo.InvariantCulture, "$param{0}", parameterOrdinal); } /// <summary> /// Returns a placeholder character for the specified parameter i. /// </summary> /// <param name="parameterOrdinal">The index of the parameter to provide a placeholder for</param> /// <returns>Returns a "?" character, used for all placeholders.</returns> protected override string GetParameterPlaceholder(int parameterOrdinal) { return GetParameterName(parameterOrdinal); } /// <summary> /// Sets the handler for receiving row updating events. Used by the DbCommandBuilder to autogenerate SQL /// statements that may not have previously been generated. /// </summary> /// <param name="adapter">A data adapter to receive events on.</param> protected override void SetRowUpdatingHandler(DbDataAdapter adapter) { SQLiteDataAdapter adp = (SQLiteDataAdapter)adapter; _handler = new EventHandler<RowUpdatingEventArgs>(RowUpdatingEventHandler); adp.RowUpdating += _handler; } private void RowUpdatingEventHandler(object sender, RowUpdatingEventArgs e) { base.RowUpdatingHandler(e); } } } |
Changes to System.Data.SQLite/SQLiteConnectionStringBuilder.cs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; using System.Data.Common; using System.ComponentModel; using System.Collections; #if !PLATFORM_COMPACTFRAMEWORK using System.ComponentModel.Design; /// <summary> /// SQLite implementation of DbConnectionStringBuilder. /// </summary> | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; using System.Data.Common; using System.ComponentModel; using System.Collections; using System.Globalization; #if !PLATFORM_COMPACTFRAMEWORK using System.ComponentModel.Design; /// <summary> /// SQLite implementation of DbConnectionStringBuilder. /// </summary> |
︙ | ︙ | |||
66 67 68 69 70 71 72 | [DefaultValue(3)] public int Version { get { if (ContainsKey("Version") == false) return 3; | | | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | [DefaultValue(3)] public int Version { get { if (ContainsKey("Version") == false) return 3; return Convert.ToInt32(this["Version"], CultureInfo.CurrentCulture); } set { if (value != 3) throw new NotSupportedException(); this["Version"] = value; |
︙ | ︙ | |||
104 105 106 107 108 109 110 | /// </summary> [Browsable(true)] [DefaultValue(false)] public bool UseUTF16Encoding { get { | | | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | /// </summary> [Browsable(true)] [DefaultValue(false)] public bool UseUTF16Encoding { get { return Convert.ToBoolean(this["UseUTF16Encoding"], CultureInfo.CurrentCulture); } set { this["UseUTF16Encoding"] = value; } } |
︙ | ︙ | |||
142 143 144 145 146 147 148 | [Browsable(true)] [DefaultValue(1024)] public int PageSize { get { if (ContainsKey("Page Size") == false) return 1024; | | | | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | [Browsable(true)] [DefaultValue(1024)] public int PageSize { get { if (ContainsKey("Page Size") == false) return 1024; return Convert.ToInt32(this["Page Size"], CultureInfo.InvariantCulture); } set { this["Page Size"] = value; } } /// <summary> /// Gets/Sets the cache size for the connection. /// </summary> [DisplayName("Cache Size")] [Browsable(true)] [DefaultValue(2000)] public int CacheSize { get { if (ContainsKey("Cache Size") == false) return 2000; return Convert.ToInt32(this["Cache Size"], CultureInfo.InvariantCulture); } set { this["Cache Size"] = value; } } |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteDataAdapter.cs.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; using System.Data; using System.Data.Common; | < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Robert Simpson (robert@blackcastlesoft.com) * * Released to the public domain, use at your own risk! ********************************************************/ namespace System.Data.SQLite { using System; using System.Data; using System.Data.Common; /// <summary> /// SQLite implementation of DbDataAdapter. /// </summary> public sealed class SQLiteDataAdapter : DbDataAdapter { /// <overloads> /// This class is just a shell around the DbDataAdapter. Nothing from DbDataAdapter is overridden here, just a few constructors are defined. /// </overloads> /// <summary> /// Default constructor. /// </summary> public SQLiteDataAdapter() |
︙ | ︙ | |||
69 70 71 72 73 74 75 | public SQLiteDataAdapter(string commandText, string connectionString) { SQLiteConnection cnn = new SQLiteConnection(connectionString); SelectCommand = new SQLiteCommand(commandText, cnn); } /// <summary> | | | | < < < < | < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < | | < | | | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | public SQLiteDataAdapter(string commandText, string connectionString) { SQLiteConnection cnn = new SQLiteConnection(connectionString); SelectCommand = new SQLiteCommand(commandText, cnn); } /// <summary> /// Row updating event handler /// </summary> public event EventHandler<RowUpdatingEventArgs> RowUpdating; /// <summary> /// Row updated event handler /// </summary> public event EventHandler<RowUpdatedEventArgs> RowUpdated; /// <summary> /// Raised by the underlying DbDataAdapter when a row is being updated /// </summary> /// <param name="value">The event's specifics</param> protected override void OnRowUpdating(RowUpdatingEventArgs value) { if (RowUpdating != null) RowUpdating(this, value); } /// <summary> /// Raised by DbDataAdapter after a row is updated /// </summary> /// <param name="value">The event's specifics</param> protected override void OnRowUpdated(RowUpdatedEventArgs value) { if (RowUpdated != null) RowUpdated(this, value); } } } |