Browse Source

Updated Nuget Packages.

Optimized Blacklist module to not use locks.
Teknikode 1 year ago
parent
commit
3b17dd9e76
62 changed files with 12836 additions and 1169 deletions
  1. 3
    6
      ServerMaint/ServerMaint.csproj
  2. 4
    4
      ServerMaint/app.config
  3. 2
    2
      ServerMaint/packages.config
  4. 5
    48
      Teknik/Modules/BlacklistModule.cs
  5. BIN
      Teknik/Scripts/_references.js
  6. 0
    4
      Teknik/Scripts/jquery-3.1.1.min.js
  7. 0
    1
      Teknik/Scripts/jquery-3.1.1.min.map
  8. 0
    4
      Teknik/Scripts/jquery-3.1.1.slim.min.js
  9. 0
    1
      Teknik/Scripts/jquery-3.1.1.slim.min.map
  10. 2670
    0
      Teknik/Scripts/jquery-3.3.1.intellisense.js
  11. 601
    457
      Teknik/Scripts/jquery-3.3.1.js
  12. 2
    0
      Teknik/Scripts/jquery-3.3.1.min.js
  13. 1
    0
      Teknik/Scripts/jquery-3.3.1.min.map
  14. 564
    402
      Teknik/Scripts/jquery-3.3.1.slim.js
  15. 2
    0
      Teknik/Scripts/jquery-3.3.1.slim.min.js
  16. 1
    0
      Teknik/Scripts/jquery-3.3.1.slim.min.map
  17. 0
    9
      Teknik/Scripts/jquery.signalR-2.2.1.min.js
  18. 7
    4
      Teknik/Scripts/jquery.signalR-2.2.2.js
  19. 9
    0
      Teknik/Scripts/jquery.signalR-2.2.2.min.js
  20. 2
    2
      Teknik/Scripts/jquery.validate-vsdoc.js
  21. 89
    62
      Teknik/Scripts/jquery.validate.js
  22. 4
    4
      Teknik/Scripts/jquery.validate.min.js
  23. 49
    42
      Teknik/Teknik.csproj
  24. 13
    13
      Teknik/Web.config
  25. 934
    0
      Teknik/docs/MySqlCommand.xml
  26. 321
    0
      Teknik/docs/MySqlCommandBuilder.xml
  27. 1248
    0
      Teknik/docs/MySqlConnection.xml
  28. 55
    0
      Teknik/docs/MySqlConnectionStringBuilder.xml
  29. 801
    0
      Teknik/docs/MySqlDataAdapter.xml
  30. 452
    0
      Teknik/docs/MySqlDataReader.xml
  31. 53
    0
      Teknik/docs/MySqlException.xml
  32. 53
    0
      Teknik/docs/MySqlHelper.xml
  33. 45
    0
      Teknik/docs/MySqlParameter.xml
  34. 45
    0
      Teknik/docs/MySqlParameterCollection.xml
  35. 329
    0
      Teknik/docs/MySqlTransaction.xml
  36. 15
    15
      Teknik/packages.config
  37. 4
    4
      TeknikStreaming/App.config
  38. 2
    4
      TeknikStreaming/TeknikStreaming.csproj
  39. 1
    1
      TeknikStreaming/packages.config
  40. 21
    13
      TeknikTests/TeknikTests.csproj
  41. 9
    8
      TeknikTests/packages.config
  42. 1
    2
      Utilities/Configuration/Configuration.csproj
  43. 1
    1
      Utilities/Configuration/packages.config
  44. 2
    3
      Utilities/Piwik/Piwik.csproj
  45. 22
    23
      Utilities/Piwik/Tracking.cs
  46. 1
    1
      Utilities/Piwik/packages.config
  47. 24
    5
      Utilities/Utilities/Utilities.csproj
  48. 1
    1
      Utilities/Utilities/app.config
  49. 934
    0
      Utilities/Utilities/docs/MySqlCommand.xml
  50. 321
    0
      Utilities/Utilities/docs/MySqlCommandBuilder.xml
  51. 1248
    0
      Utilities/Utilities/docs/MySqlConnection.xml
  52. 55
    0
      Utilities/Utilities/docs/MySqlConnectionStringBuilder.xml
  53. 801
    0
      Utilities/Utilities/docs/MySqlDataAdapter.xml
  54. 452
    0
      Utilities/Utilities/docs/MySqlDataReader.xml
  55. 53
    0
      Utilities/Utilities/docs/MySqlException.xml
  56. 53
    0
      Utilities/Utilities/docs/MySqlHelper.xml
  57. 45
    0
      Utilities/Utilities/docs/MySqlParameter.xml
  58. 45
    0
      Utilities/Utilities/docs/MySqlParameterCollection.xml
  59. 329
    0
      Utilities/Utilities/docs/MySqlTransaction.xml
  60. 2
    2
      Utilities/Utilities/packages.config
  61. 21
    13
      UtilitiesTests/UtilitiesTests.csproj
  62. 9
    8
      UtilitiesTests/packages.config

+ 3
- 6
ServerMaint/ServerMaint.csproj View File

@@ -57,12 +57,10 @@
57 57
       <Private>True</Private>
58 58
     </Reference>
59 59
     <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
60
-      <HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
61
-      <Private>True</Private>
60
+      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
62 61
     </Reference>
63 62
     <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
64
-      <HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
65
-      <Private>True</Private>
63
+      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
66 64
     </Reference>
67 65
     <Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
68 66
       <HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
@@ -77,8 +75,7 @@
77 75
       <Private>True</Private>
78 76
     </Reference>
79 77
     <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
80
-      <HintPath>..\packages\Newtonsoft.Json.10.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
81
-      <Private>True</Private>
78
+      <HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
82 79
     </Reference>
83 80
     <Reference Include="System" />
84 81
     <Reference Include="System.ComponentModel.DataAnnotations" />

+ 4
- 4
ServerMaint/app.config View File

@@ -1,9 +1,9 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <configuration>
3 3
   <configSections>
4
-    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
4
+    
5 5
     <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
6
-  </configSections>
6
+  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
7 7
   <connectionStrings configSource="ConnectionStrings.config" />
8 8
   <startup>
9 9
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
@@ -30,11 +30,11 @@
30 30
       </dependentAssembly>
31 31
       <dependentAssembly>
32 32
         <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
33
-        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
33
+        <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
34 34
       </dependentAssembly>
35 35
       <dependentAssembly>
36 36
         <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
37
-        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
37
+        <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
38 38
       </dependentAssembly>
39 39
     </assemblyBinding>
40 40
   </runtime>

+ 2
- 2
ServerMaint/packages.config View File

@@ -1,10 +1,10 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <packages>
3 3
   <package id="CommandLineParser" version="1.9.71" targetFramework="net452" />
4
-  <package id="EntityFramework" version="6.1.3" targetFramework="net452" />
4
+  <package id="EntityFramework" version="6.2.0" targetFramework="net462" />
5 5
   <package id="GitVersionTask" version="3.6.5" targetFramework="net462" developmentDependency="true" />
6 6
   <package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net452" />
7 7
   <package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net452" />
8 8
   <package id="nClam" version="2.0.6.0" targetFramework="net462" />
9
-  <package id="Newtonsoft.Json" version="10.0.1" targetFramework="net462" />
9
+  <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net462" />
10 10
 </packages>

+ 5
- 48
Teknik/Modules/BlacklistModule.cs View File

@@ -33,56 +33,11 @@ namespace Teknik.Modules
33 33
             context.BeginRequest += onBeginRequest;
34 34
         }
35 35
 
36
-        #region Referrer Info
37
-        private const string BLOCKEDREFERRERKEY = "BlockedReferrer";
38
-        private static string referrerFileName = null;
39
-        private static object referrerFileNameObj = new object();
40
-
41
-        public static string GetReferrerFilePath()
42
-        {
43
-            if (referrerFileName != null)
44
-                return referrerFileName;
45
-            lock (referrerFileNameObj)
46
-            {
47
-                if (referrerFileName == null)
48
-                {
49
-                    Config config = Config.Load();
50
-                    referrerFileName = config.ReferrerBlacklistFile;
51
-                }
52
-            }
53
-
54
-            return referrerFileName;
55
-        }
56
-        #endregion
57
-
58
-        #region IP Info
59
-        private const string BLOCKEDIPKEY = "BlockedIP";
60
-        private static string ipFileName = null;
61
-        private static object ipFileNameObj = new object();
62
-
63
-        public static string GetIPFilePath()
64
-        {
65
-            if (ipFileName != null)
66
-                return ipFileName;
67
-            lock (ipFileNameObj)
68
-            {
69
-                if (ipFileName == null)
70
-                {
71
-                    Config config = Config.Load();
72
-                    ipFileName = config.IPBlacklistFile;
73
-                }
74
-            }
75
-
76
-            return ipFileName;
77
-        }
78
-        #endregion
79
-
80
-        public static StringDictionary GetFileData(HttpContext context, string key, Func<string> fn)
36
+        public static StringDictionary GetFileData(HttpContext context, string key, string filePath)
81 37
         {
82 38
             StringDictionary data = (StringDictionary)context.Cache[key];
83 39
             if (data == null)
84 40
             {
85
-                string filePath = fn();
86 41
                 data = GetFileLines(filePath);
87 42
                 context.Cache.Insert(key, data, new CacheDependency(filePath));
88 43
             }
@@ -118,6 +73,8 @@ namespace Teknik.Modules
118 73
 
119 74
             if (app != null)
120 75
             {
76
+                Config config = Config.Load();
77
+
121 78
                 bool blocked = false;
122 79
                 string blockReason = string.Empty;
123 80
 
@@ -127,7 +84,7 @@ namespace Teknik.Modules
127 84
                     string IPAddr = app.Context.Request.ServerVariables["REMOTE_ADDR"];
128 85
                     if (!string.IsNullOrEmpty(IPAddr))
129 86
                     {
130
-                        StringDictionary badIPs = GetFileData(app.Context, BLOCKEDIPKEY, GetIPFilePath);
87
+                        StringDictionary badIPs = GetFileData(app.Context, "BlockedIPs", config.IPBlacklistFile);
131 88
 
132 89
                         blocked |= (badIPs != null && badIPs.ContainsKey(IPAddr));
133 90
                         blockReason = $"This IP address ({IPAddr}) has been blacklisted.  If you feel this is in error, please contact support@teknik.io for assistance.";
@@ -141,7 +98,7 @@ namespace Teknik.Modules
141 98
                     string referrer = app.Context.Request.UrlReferrer?.Host;
142 99
                     if (!string.IsNullOrEmpty(referrer))
143 100
                     {
144
-                        StringDictionary badReferrers = GetFileData(app.Context, BLOCKEDREFERRERKEY, GetReferrerFilePath);
101
+                        StringDictionary badReferrers = GetFileData(app.Context, "BlockedReferrers", config.ReferrerBlacklistFile);
145 102
 
146 103
                         blocked |= (badReferrers != null && badReferrers.ContainsKey(referrer));
147 104
                         blockReason = $"This referrer ({referrer}) has been blacklisted.  If you feel this is in error, please contact support@teknik.io for assistance.";

BIN
Teknik/Scripts/_references.js View File


+ 0
- 4
Teknik/Scripts/jquery-3.1.1.min.js
File diff suppressed because it is too large
View File


+ 0
- 1
Teknik/Scripts/jquery-3.1.1.min.map
File diff suppressed because it is too large
View File


+ 0
- 4
Teknik/Scripts/jquery-3.1.1.slim.min.js
File diff suppressed because it is too large
View File


+ 0
- 1
Teknik/Scripts/jquery-3.1.1.slim.min.map
File diff suppressed because it is too large
View File


+ 2670
- 0
Teknik/Scripts/jquery-3.3.1.intellisense.js
File diff suppressed because it is too large
View File


Teknik/Scripts/jquery-3.3.1.js
File diff suppressed because it is too large
View File


+ 2
- 0
Teknik/Scripts/jquery-3.3.1.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
Teknik/Scripts/jquery-3.3.1.min.map
File diff suppressed because it is too large
View File


Teknik/Scripts/jquery-3.3.1.slim.js
File diff suppressed because it is too large
View File


+ 2
- 0
Teknik/Scripts/jquery-3.3.1.slim.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
Teknik/Scripts/jquery-3.3.1.slim.min.map
File diff suppressed because it is too large
View File


+ 0
- 9
Teknik/Scripts/jquery.signalR-2.2.1.min.js
File diff suppressed because it is too large
View File


Teknik/Scripts/jquery.signalR-2.2.1.js → Teknik/Scripts/jquery.signalR-2.2.2.js View File

@@ -1,7 +1,7 @@
1 1
 /* jquery.signalR.core.js */
2 2
 /*global window:false */
3 3
 /*!
4
- * ASP.NET SignalR JavaScript Library v2.2.1
4
+ * ASP.NET SignalR JavaScript Library v2.2.2
5 5
  * http://signalr.net/
6 6
  *
7 7
  * Copyright (c) .NET Foundation. All rights reserved.
@@ -950,6 +950,9 @@
950 950
 
951 951
             // Clear out our message buffer
952 952
             connection._.connectingMessageBuffer.clear();
953
+            
954
+            // Clean up this event
955
+            $(connection).unbind(events.onStart);
953 956
 
954 957
             // Trigger the disconnect event
955 958
             changeState(connection, connection.state, signalR.connectionState.disconnected);
@@ -2227,8 +2230,8 @@
2227 2230
                 }
2228 2231
 
2229 2232
                 // Ensure the iframe is where we left it
2230
-                if (connection.frame.parentNode === window.document.body) {
2231
-                    window.document.body.removeChild(connection.frame);
2233
+                if (connection.frame.parentNode === window.document.documentElement) {
2234
+                    window.document.documentElement.removeChild(connection.frame);
2232 2235
                 }
2233 2236
 
2234 2237
                 delete transportLogic.foreverFrame.connections[connection.frameId];
@@ -2951,5 +2954,5 @@
2951 2954
 /*global window:false */
2952 2955
 /// <reference path="jquery.signalR.core.js" />
2953 2956
 (function ($, undefined) {
2954
-    $.signalR.version = "2.2.1";
2957
+    $.signalR.version = "2.2.2";
2955 2958
 }(window.jQuery));

+ 9
- 0
Teknik/Scripts/jquery.signalR-2.2.2.min.js
File diff suppressed because it is too large
View File


+ 2
- 2
Teknik/Scripts/jquery.validate-vsdoc.js View File

@@ -4,7 +4,7 @@
4 4
 * intended to be used only for design-time IntelliSense.  Please use the
5 5
 * standard jQuery library for all production use.
6 6
 *
7
-* Comment version: 1.16.0
7
+* Comment version: 1.17.0
8 8
 */
9 9
 
10 10
 /*
@@ -15,7 +15,7 @@
15 15
 * for informational purposes only and are not the license terms under
16 16
 * which Microsoft distributed this file.
17 17
 *
18
-* jQuery Validation Plugin - v1.16.0 - 12/5/2016
18
+* jQuery Validation Plugin - v1.17.0 - 12/5/2016
19 19
 * https://github.com/jzaefferer/jquery-validation
20 20
 * Copyright (c) 2013 Jörn Zaefferer; Licensed MIT
21 21
 *

+ 89
- 62
Teknik/Scripts/jquery.validate.js View File

@@ -1,9 +1,9 @@
1 1
 /*!
2
- * jQuery Validation Plugin v1.16.0
2
+ * jQuery Validation Plugin v1.17.0
3 3
  *
4
- * http://jqueryvalidation.org/
4
+ * https://jqueryvalidation.org/
5 5
  *
6
- * Copyright (c) 2016 Jörn Zaefferer
6
+ * Copyright (c) 2017 Jörn Zaefferer
7 7
  * Released under the MIT license
8 8
  */
9 9
 (function( factory ) {
@@ -18,7 +18,7 @@
18 18
 
19 19
 $.extend( $.fn, {
20 20
 
21
-	// http://jqueryvalidation.org/validate/
21
+	// https://jqueryvalidation.org/validate/
22 22
 	validate: function( options ) {
23 23
 
24 24
 		// If nothing is selected, return nothing; can't chain anyway
@@ -44,9 +44,10 @@ $.extend( $.fn, {
44 44
 		if ( validator.settings.onsubmit ) {
45 45
 
46 46
 			this.on( "click.validate", ":submit", function( event ) {
47
-				if ( validator.settings.submitHandler ) {
48
-					validator.submitButton = event.target;
49
-				}
47
+
48
+				// Track the used submit button to properly handle scripted
49
+				// submits later.
50
+				validator.submitButton = event.currentTarget;
50 51
 
51 52
 				// Allow suppressing validation by adding a cancel class to the submit button
52 53
 				if ( $( this ).hasClass( "cancel" ) ) {
@@ -68,17 +69,22 @@ $.extend( $.fn, {
68 69
 				}
69 70
 				function handle() {
70 71
 					var hidden, result;
71
-					if ( validator.settings.submitHandler ) {
72
-						if ( validator.submitButton ) {
73 72
 
74
-							// Insert a hidden input as a replacement for the missing submit button
75
-							hidden = $( "<input type='hidden'/>" )
76
-								.attr( "name", validator.submitButton.name )
77
-								.val( $( validator.submitButton ).val() )
78
-								.appendTo( validator.currentForm );
79
-						}
73
+					// Insert a hidden input as a replacement for the missing submit button
74
+					// The hidden input is inserted in two cases:
75
+					//   - A user defined a `submitHandler`
76
+					//   - There was a pending request due to `remote` method and `stopRequest()`
77
+					//     was called to submit the form in case it's valid
78
+					if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
79
+						hidden = $( "<input type='hidden'/>" )
80
+							.attr( "name", validator.submitButton.name )
81
+							.val( $( validator.submitButton ).val() )
82
+							.appendTo( validator.currentForm );
83
+					}
84
+
85
+					if ( validator.settings.submitHandler ) {
80 86
 						result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
81
-						if ( validator.submitButton ) {
87
+						if ( hidden ) {
82 88
 
83 89
 							// And clean up afterwards; thanks to no-block-scope, hidden can be referenced
84 90
 							hidden.remove();
@@ -112,7 +118,7 @@ $.extend( $.fn, {
112 118
 		return validator;
113 119
 	},
114 120
 
115
-	// http://jqueryvalidation.org/valid/
121
+	// https://jqueryvalidation.org/valid/
116 122
 	valid: function() {
117 123
 		var valid, validator, errorList;
118 124
 
@@ -133,13 +139,22 @@ $.extend( $.fn, {
133 139
 		return valid;
134 140
 	},
135 141
 
136
-	// http://jqueryvalidation.org/rules/
142
+	// https://jqueryvalidation.org/rules/
137 143
 	rules: function( command, argument ) {
138 144
 		var element = this[ 0 ],
139 145
 			settings, staticRules, existingRules, data, param, filtered;
140 146
 
141 147
 		// If nothing is selected, return empty object; can't chain anyway
142
-		if ( element == null || element.form == null ) {
148
+		if ( element == null ) {
149
+			return;
150
+		}
151
+
152
+		if ( !element.form && element.hasAttribute( "contenteditable" ) ) {
153
+			element.form = this.closest( "form" )[ 0 ];
154
+			element.name = this.attr( "name" );
155
+		}
156
+
157
+		if ( element.form == null ) {
143 158
 			return;
144 159
 		}
145 160
 
@@ -167,9 +182,6 @@ $.extend( $.fn, {
167 182
 				$.each( argument.split( /\s/ ), function( index, method ) {
168 183
 					filtered[ method ] = existingRules[ method ];
169 184
 					delete existingRules[ method ];
170
-					if ( method === "required" ) {
171
-						$( element ).removeAttr( "aria-required" );
172
-					}
173 185
 				} );
174 186
 				return filtered;
175 187
 			}
@@ -189,7 +201,6 @@ $.extend( $.fn, {
189 201
 			param = data.required;
190 202
 			delete data.required;
191 203
 			data = $.extend( { required: param }, data );
192
-			$( element ).attr( "aria-required", "true" );
193 204
 		}
194 205
 
195 206
 		// Make sure remote is at back
@@ -206,18 +217,18 @@ $.extend( $.fn, {
206 217
 // Custom selectors
207 218
 $.extend( $.expr.pseudos || $.expr[ ":" ], {		// '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
208 219
 
209
-	// http://jqueryvalidation.org/blank-selector/
220
+	// https://jqueryvalidation.org/blank-selector/
210 221
 	blank: function( a ) {
211 222
 		return !$.trim( "" + $( a ).val() );
212 223
 	},
213 224
 
214
-	// http://jqueryvalidation.org/filled-selector/
225
+	// https://jqueryvalidation.org/filled-selector/
215 226
 	filled: function( a ) {
216 227
 		var val = $( a ).val();
217 228
 		return val !== null && !!$.trim( "" + val );
218 229
 	},
219 230
 
220
-	// http://jqueryvalidation.org/unchecked-selector/
231
+	// https://jqueryvalidation.org/unchecked-selector/
221 232
 	unchecked: function( a ) {
222 233
 		return !$( a ).prop( "checked" );
223 234
 	}
@@ -230,7 +241,7 @@ $.validator = function( options, form ) {
230 241
 	this.init();
231 242
 };
232 243
 
233
-// http://jqueryvalidation.org/jQuery.validator.format/
244
+// https://jqueryvalidation.org/jQuery.validator.format/
234 245
 $.validator.format = function( source, params ) {
235 246
 	if ( arguments.length === 1 ) {
236 247
 		return function() {
@@ -343,7 +354,7 @@ $.extend( $.validator, {
343 354
 		}
344 355
 	},
345 356
 
346
-	// http://jqueryvalidation.org/jQuery.validator.setDefaults/
357
+	// https://jqueryvalidation.org/jQuery.validator.setDefaults/
347 358
 	setDefaults: function( settings ) {
348 359
 		$.extend( $.validator.defaults, settings );
349 360
 	},
@@ -402,6 +413,7 @@ $.extend( $.validator, {
402 413
 				// Set form expando on contenteditable
403 414
 				if ( !this.form && this.hasAttribute( "contenteditable" ) ) {
404 415
 					this.form = $( this ).closest( "form" )[ 0 ];
416
+					this.name = $( this ).attr( "name" );
405 417
 				}
406 418
 
407 419
 				var validator = $.data( this.form, "validator" ),
@@ -426,13 +438,9 @@ $.extend( $.validator, {
426 438
 			if ( this.settings.invalidHandler ) {
427 439
 				$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
428 440
 			}
429
-
430
-			// Add aria-required to any Static/Data/Class required fields before first validation
431
-			// Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
432
-			$( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
433 441
 		},
434 442
 
435
-		// http://jqueryvalidation.org/Validator.form/
443
+		// https://jqueryvalidation.org/Validator.form/
436 444
 		form: function() {
437 445
 			this.checkForm();
438 446
 			$.extend( this.submitted, this.errorMap );
@@ -452,7 +460,7 @@ $.extend( $.validator, {
452 460
 			return this.valid();
453 461
 		},
454 462
 
455
-		// http://jqueryvalidation.org/Validator.element/
463
+		// https://jqueryvalidation.org/Validator.element/
456 464
 		element: function( element ) {
457 465
 			var cleanElement = this.clean( element ),
458 466
 				checkElement = this.validationTargetFor( cleanElement ),
@@ -503,7 +511,7 @@ $.extend( $.validator, {
503 511
 			return result;
504 512
 		},
505 513
 
506
-		// http://jqueryvalidation.org/Validator.showErrors/
514
+		// https://jqueryvalidation.org/Validator.showErrors/
507 515
 		showErrors: function( errors ) {
508 516
 			if ( errors ) {
509 517
 				var validator = this;
@@ -529,7 +537,7 @@ $.extend( $.validator, {
529 537
 			}
530 538
 		},
531 539
 
532
-		// http://jqueryvalidation.org/Validator.resetForm/
540
+		// https://jqueryvalidation.org/Validator.resetForm/
533 541
 		resetForm: function() {
534 542
 			if ( $.fn.resetForm ) {
535 543
 				$( this.currentForm ).resetForm();
@@ -570,7 +578,10 @@ $.extend( $.validator, {
570 578
 			var count = 0,
571 579
 				i;
572 580
 			for ( i in obj ) {
573
-				if ( obj[ i ] ) {
581
+
582
+				// This check allows counting elements with empty error
583
+				// message as invalid elements
584
+				if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
574 585
 					count++;
575 586
 				}
576 587
 			}
@@ -635,6 +646,7 @@ $.extend( $.validator, {
635 646
 				// Set form expando on contenteditable
636 647
 				if ( this.hasAttribute( "contenteditable" ) ) {
637 648
 					this.form = $( this ).closest( "form" )[ 0 ];
649
+					this.name = name;
638 650
 				}
639 651
 
640 652
 				// Select only the first element for each name, and only those with rules specified
@@ -735,21 +747,27 @@ $.extend( $.validator, {
735 747
 				} ).length,
736 748
 				dependencyMismatch = false,
737 749
 				val = this.elementValue( element ),
738
-				result, method, rule;
750
+				result, method, rule, normalizer;
739 751
 
740
-			// If a normalizer is defined for this element, then
741
-			// call it to retreive the changed value instead
752
+			// Prioritize the local normalizer defined for this element over the global one
753
+			// if the former exists, otherwise user the global one in case it exists.
754
+			if ( typeof rules.normalizer === "function" ) {
755
+				normalizer = rules.normalizer;
756
+			} else if (	typeof this.settings.normalizer === "function" ) {
757
+				normalizer = this.settings.normalizer;
758
+			}
759
+
760
+			// If normalizer is defined, then call it to retreive the changed value instead
742 761
 			// of using the real one.
743 762
 			// Note that `this` in the normalizer is `element`.
744
-			if ( typeof rules.normalizer === "function" ) {
745
-				val = rules.normalizer.call( element, val );
763
+			if ( normalizer ) {
764
+				val = normalizer.call( element, val );
746 765
 
747 766
 				if ( typeof val !== "string" ) {
748 767
 					throw new TypeError( "The normalizer should return a string value." );
749 768
 				}
750 769
 
751
-				// Delete the normalizer from rules to avoid treating
752
-				// it as a pre-defined method.
770
+				// Delete the normalizer from rules to avoid treating it as a pre-defined method.
753 771
 				delete rules.normalizer;
754 772
 			}
755 773
 
@@ -1089,6 +1107,15 @@ $.extend( $.validator, {
1089 1107
 			$( element ).removeClass( this.settings.pendingClass );
1090 1108
 			if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
1091 1109
 				$( this.currentForm ).submit();
1110
+
1111
+				// Remove the hidden input that was used as a replacement for the
1112
+				// missing submit button. The hidden input is added by `handle()`
1113
+				// to ensure that the value of the used submit button is passed on
1114
+				// for scripted submits triggered by this method
1115
+				if ( this.submitButton ) {
1116
+					$( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
1117
+				}
1118
+
1092 1119
 				this.formSubmitted = false;
1093 1120
 			} else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
1094 1121
 				$( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
@@ -1316,7 +1343,7 @@ $.extend( $.validator, {
1316 1343
 		return data;
1317 1344
 	},
1318 1345
 
1319
-	// http://jqueryvalidation.org/jQuery.validator.addMethod/
1346
+	// https://jqueryvalidation.org/jQuery.validator.addMethod/
1320 1347
 	addMethod: function( name, method, message ) {
1321 1348
 		$.validator.methods[ name ] = method;
1322 1349
 		$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1325,10 +1352,10 @@ $.extend( $.validator, {
1325 1352
 		}
1326 1353
 	},
1327 1354
 
1328
-	// http://jqueryvalidation.org/jQuery.validator.methods/
1355
+	// https://jqueryvalidation.org/jQuery.validator.methods/
1329 1356
 	methods: {
1330 1357
 
1331
-		// http://jqueryvalidation.org/required-method/
1358
+		// https://jqueryvalidation.org/required-method/
1332 1359
 		required: function( value, element, param ) {
1333 1360
 
1334 1361
 			// Check if dependency is met
@@ -1347,7 +1374,7 @@ $.extend( $.validator, {
1347 1374
 			return value.length > 0;
1348 1375
 		},
1349 1376
 
1350
-		// http://jqueryvalidation.org/email-method/
1377
+		// https://jqueryvalidation.org/email-method/
1351 1378
 		email: function( value, element ) {
1352 1379
 
1353 1380
 			// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
@@ -1357,7 +1384,7 @@ $.extend( $.validator, {
1357 1384
 			return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
1358 1385
 		},
1359 1386
 
1360
-		// http://jqueryvalidation.org/url-method/
1387
+		// https://jqueryvalidation.org/url-method/
1361 1388
 		url: function( value, element ) {
1362 1389
 
1363 1390
 			// Copyright (c) 2010-2013 Diego Perini, MIT licensed
@@ -1367,60 +1394,60 @@ $.extend( $.validator, {
1367 1394
 			return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
1368 1395
 		},
1369 1396
 
1370
-		// http://jqueryvalidation.org/date-method/
1397
+		// https://jqueryvalidation.org/date-method/
1371 1398
 		date: function( value, element ) {
1372 1399
 			return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
1373 1400
 		},
1374 1401
 
1375
-		// http://jqueryvalidation.org/dateISO-method/
1402
+		// https://jqueryvalidation.org/dateISO-method/
1376 1403
 		dateISO: function( value, element ) {
1377 1404
 			return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
1378 1405
 		},
1379 1406
 
1380
-		// http://jqueryvalidation.org/number-method/
1407
+		// https://jqueryvalidation.org/number-method/
1381 1408
 		number: function( value, element ) {
1382 1409
 			return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
1383 1410
 		},
1384 1411
 
1385
-		// http://jqueryvalidation.org/digits-method/
1412
+		// https://jqueryvalidation.org/digits-method/
1386 1413
 		digits: function( value, element ) {
1387 1414
 			return this.optional( element ) || /^\d+$/.test( value );
1388 1415
 		},
1389 1416
 
1390
-		// http://jqueryvalidation.org/minlength-method/
1417
+		// https://jqueryvalidation.org/minlength-method/
1391 1418
 		minlength: function( value, element, param ) {
1392 1419
 			var length = $.isArray( value ) ? value.length : this.getLength( value, element );
1393 1420
 			return this.optional( element ) || length >= param;
1394 1421
 		},
1395 1422
 
1396
-		// http://jqueryvalidation.org/maxlength-method/
1423
+		// https://jqueryvalidation.org/maxlength-method/
1397 1424
 		maxlength: function( value, element, param ) {
1398 1425
 			var length = $.isArray( value ) ? value.length : this.getLength( value, element );
1399 1426
 			return this.optional( element ) || length <= param;
1400 1427
 		},
1401 1428
 
1402
-		// http://jqueryvalidation.org/rangelength-method/
1429
+		// https://jqueryvalidation.org/rangelength-method/
1403 1430
 		rangelength: function( value, element, param ) {
1404 1431
 			var length = $.isArray( value ) ? value.length : this.getLength( value, element );
1405 1432
 			return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
1406 1433
 		},
1407 1434
 
1408
-		// http://jqueryvalidation.org/min-method/
1435
+		// https://jqueryvalidation.org/min-method/
1409 1436
 		min: function( value, element, param ) {
1410 1437
 			return this.optional( element ) || value >= param;
1411 1438
 		},
1412 1439
 
1413
-		// http://jqueryvalidation.org/max-method/
1440
+		// https://jqueryvalidation.org/max-method/
1414 1441
 		max: function( value, element, param ) {
1415 1442
 			return this.optional( element ) || value <= param;
1416 1443
 		},
1417 1444
 
1418
-		// http://jqueryvalidation.org/range-method/
1445
+		// https://jqueryvalidation.org/range-method/
1419 1446
 		range: function( value, element, param ) {
1420 1447
 			return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
1421 1448
 		},
1422 1449
 
1423
-		// http://jqueryvalidation.org/step-method/
1450
+		// https://jqueryvalidation.org/step-method/
1424 1451
 		step: function( value, element, param ) {
1425 1452
 			var type = $( element ).attr( "type" ),
1426 1453
 				errorMessage = "Step attribute on input type " + type + " is not supported.",
@@ -1458,7 +1485,7 @@ $.extend( $.validator, {
1458 1485
 			return this.optional( element ) || valid;
1459 1486
 		},
1460 1487
 
1461
-		// http://jqueryvalidation.org/equalTo-method/
1488
+		// https://jqueryvalidation.org/equalTo-method/
1462 1489
 		equalTo: function( value, element, param ) {
1463 1490
 
1464 1491
 			// Bind to the blur event of the target in order to revalidate whenever the target field is updated
@@ -1471,7 +1498,7 @@ $.extend( $.validator, {
1471 1498
 			return value === target.val();
1472 1499
 		},
1473 1500
 
1474
-		// http://jqueryvalidation.org/remote-method/
1501
+		// https://jqueryvalidation.org/remote-method/
1475 1502
 		remote: function( value, element, param, method ) {
1476 1503
 			if ( this.optional( element ) ) {
1477 1504
 				return "dependency-mismatch";

+ 4
- 4
Teknik/Scripts/jquery.validate.min.js
File diff suppressed because it is too large
View File


+ 49
- 42
Teknik/Teknik.csproj View File

@@ -1,7 +1,7 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
-  <Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
4
-  <Import Project="..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" />
3
+  <Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
4
+  <Import Project="..\packages\Microsoft.Net.Compilers.2.6.1\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.2.6.1\build\Microsoft.Net.Compilers.props')" />
5 5
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
6 6
   <PropertyGroup>
7 7
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -53,12 +53,10 @@
53 53
       <Private>True</Private>
54 54
     </Reference>
55 55
     <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
56
-      <HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
57
-      <Private>True</Private>
56
+      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
58 57
     </Reference>
59 58
     <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
60
-      <HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
61
-      <Private>True</Private>
59
+      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
62 60
     </Reference>
63 61
     <Reference Include="IRCSharp, Version=1.0.0.1, Culture=neutral, processorArchitecture=MSIL">
64 62
       <HintPath>..\packages\IRCSharp.1.0.0.1\lib\net462\IRCSharp.dll</HintPath>
@@ -76,41 +74,34 @@
76 74
       <HintPath>..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
77 75
       <Private>True</Private>
78 76
     </Reference>
79
-    <Reference Include="Microsoft.AspNet.SignalR.Core, Version=2.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
80
-      <HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.2.1\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath>
81
-      <Private>True</Private>
77
+    <Reference Include="Microsoft.AspNet.SignalR.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
78
+      <HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.2.2\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath>
82 79
     </Reference>
83
-    <Reference Include="Microsoft.AspNet.SignalR.SystemWeb, Version=2.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
84
-      <HintPath>..\packages\Microsoft.AspNet.SignalR.SystemWeb.2.2.1\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll</HintPath>
85
-      <Private>True</Private>
80
+    <Reference Include="Microsoft.AspNet.SignalR.SystemWeb, Version=2.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
81
+      <HintPath>..\packages\Microsoft.AspNet.SignalR.SystemWeb.2.2.2\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll</HintPath>
86 82
     </Reference>
87 83
     <Reference Include="Microsoft.Azure.KeyVault.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
88 84
       <HintPath>..\packages\Microsoft.Azure.KeyVault.Core.2.0.4\lib\net45\Microsoft.Azure.KeyVault.Core.dll</HintPath>
89 85
       <Private>True</Private>
90 86
     </Reference>
91
-    <Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
92
-      <HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
93
-      <Private>True</Private>
87
+    <Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
88
+      <HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
94 89
     </Reference>
95 90
     <Reference Include="Microsoft.CSharp" />
96
-    <Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
97
-      <HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
98
-      <Private>True</Private>
91
+    <Reference Include="Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
92
+      <HintPath>..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
99 93
     </Reference>
100
-    <Reference Include="Microsoft.Owin.Host.SystemWeb, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
101
-      <HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
102
-      <Private>True</Private>
94
+    <Reference Include="Microsoft.Owin.Host.SystemWeb, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
95
+      <HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
103 96
     </Reference>
104
-    <Reference Include="Microsoft.Owin.Security, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
105
-      <HintPath>..\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
106
-      <Private>True</Private>
97
+    <Reference Include="Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
98
+      <HintPath>..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll</HintPath>
107 99
     </Reference>
108 100
     <Reference Include="Mime-Detective, Version=0.0.5.0, Culture=neutral, processorArchitecture=MSIL">
109 101
       <HintPath>..\packages\Mime-Detective.0.0.5\lib\net45\Mime-Detective.dll</HintPath>
110 102
     </Reference>
111
-    <Reference Include="MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
112
-      <HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
113
-      <Private>True</Private>
103
+    <Reference Include="MySql.Data, Version=6.10.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
104
+      <HintPath>..\packages\MySql.Data.6.10.6\lib\net452\MySql.Data.dll</HintPath>
114 105
     </Reference>
115 106
     <Reference Include="NBitcoin, Version=3.0.2.10, Culture=neutral, processorArchitecture=MSIL">
116 107
       <HintPath>..\packages\NBitcoin.3.0.2.10\lib\net45\NBitcoin.dll</HintPath>
@@ -121,16 +112,14 @@
121 112
       <Private>True</Private>
122 113
     </Reference>
123 114
     <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
124
-      <HintPath>..\packages\Newtonsoft.Json.10.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
125
-      <Private>True</Private>
115
+      <HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
126 116
     </Reference>
127 117
     <Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
128 118
       <HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
129 119
       <Private>True</Private>
130 120
     </Reference>
131
-    <Reference Include="Piwik.Tracker, Version=2.16.0.0, Culture=neutral, processorArchitecture=MSIL">
132
-      <HintPath>..\packages\Piwik.Tracker.2.16.0.0\lib\net40\Piwik.Tracker.dll</HintPath>
133
-      <Private>True</Private>
121
+    <Reference Include="Piwik.Tracker, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
122
+      <HintPath>..\packages\Piwik.Tracker.3.0.0\lib\net40\Piwik.Tracker.dll</HintPath>
134 123
     </Reference>
135 124
     <Reference Include="PresentationFramework" />
136 125
     <Reference Include="QRCoder, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL">
@@ -138,12 +127,18 @@
138 127
       <Private>True</Private>
139 128
     </Reference>
140 129
     <Reference Include="System" />
130
+    <Reference Include="System.ComponentModel" />
131
+    <Reference Include="System.Configuration.Install" />
141 132
     <Reference Include="System.Data" />
142 133
     <Reference Include="System.Data.DataSetExtensions" />
143 134
     <Reference Include="System.Drawing" />
135
+    <Reference Include="System.Drawing.Design" />
136
+    <Reference Include="System.Management" />
137
+    <Reference Include="System.Runtime" />
144 138
     <Reference Include="System.Runtime.Serialization" />
145 139
     <Reference Include="System.Security" />
146 140
     <Reference Include="System.ServiceModel" />
141
+    <Reference Include="System.Transactions" />
147 142
     <Reference Include="System.Web.DynamicData" />
148 143
     <Reference Include="System.Web.Entity" />
149 144
     <Reference Include="System.Web.ApplicationServices" />
@@ -523,6 +518,17 @@
523 518
     <Content Include="Content\Highlight\xcode.css" />
524 519
     <Content Include="Content\Highlight\zenburn.css" />
525 520
     <Content Include="Content\jquery.tocify.css" />
521
+    <Content Include="docs\MySqlCommand.xml" />
522
+    <Content Include="docs\MySqlCommandBuilder.xml" />
523
+    <Content Include="docs\MySqlConnection.xml" />
524
+    <Content Include="docs\MySqlConnectionStringBuilder.xml" />
525
+    <Content Include="docs\MySqlDataAdapter.xml" />
526
+    <Content Include="docs\MySqlDataReader.xml" />
527
+    <Content Include="docs\MySqlException.xml" />
528
+    <Content Include="docs\MySqlHelper.xml" />
529
+    <Content Include="docs\MySqlParameter.xml" />
530
+    <Content Include="docs\MySqlParameterCollection.xml" />
531
+    <Content Include="docs\MySqlTransaction.xml" />
526 532
     <Content Include="Fonts\fontawesome-webfont.svg" />
527 533
     <Content Include="Fonts\glyphicons-halflings-regular.svg" />
528 534
     <Content Include="Images\redbubble_icon.png" />
@@ -716,16 +722,17 @@
716 722
     <Content Include="Scripts\Highcharts\highcharts.js" />
717 723
     <Content Include="Scripts\Highlight\highlight.pack.js" />
718 724
     <None Include="Scripts\jquery-3.1.1.intellisense.js" />
719
-    <Content Include="Scripts\jquery-3.1.1.js" />
720
-    <Content Include="Scripts\jquery-3.1.1.min.js" />
721
-    <Content Include="Scripts\jquery-3.1.1.slim.js" />
722
-    <Content Include="Scripts\jquery-3.1.1.slim.min.js" />
725
+    <None Include="Scripts\jquery-3.3.1.intellisense.js" />
726
+    <Content Include="Scripts\jquery-3.3.1.js" />
727
+    <Content Include="Scripts\jquery-3.3.1.min.js" />
728
+    <Content Include="Scripts\jquery-3.3.1.slim.js" />
729
+    <Content Include="Scripts\jquery-3.3.1.slim.min.js" />
723 730
     <Content Include="Scripts\jquery-ui.widgets.js" />
724 731
     <Content Include="Scripts\jquery.blockUI.js" />
725 732
     <Content Include="Scripts\jquery.fileupload.js" />
726 733
     <Content Include="Scripts\jquery.iframe-transport.js" />
727
-    <Content Include="Scripts\jquery.signalR-2.2.1.js" />
728
-    <Content Include="Scripts\jquery.signalR-2.2.1.min.js" />
734
+    <Content Include="Scripts\jquery.signalR-2.2.2.js" />
735
+    <Content Include="Scripts\jquery.signalR-2.2.2.min.js" />
729 736
     <Content Include="Scripts\jquery.tocify.min.js" />
730 737
     <None Include="Scripts\jquery.validate-vsdoc.js" />
731 738
     <Content Include="Scripts\jquery.validate.js" />
@@ -769,8 +776,8 @@
769 776
     <Content Include="Areas\User\Views\User\Register.cshtml" />
770 777
     <Content Include="Areas\Dev\Views\Dev\Index.cshtml" />
771 778
     <Content Include="Areas\User\Views\User\_LoginModalPartial.cshtml" />
772
-    <Content Include="Scripts\jquery-3.1.1.slim.min.map" />
773
-    <Content Include="Scripts\jquery-3.1.1.min.map" />
779
+    <Content Include="Scripts\jquery-3.3.1.slim.min.map" />
780
+    <Content Include="Scripts\jquery-3.3.1.min.map" />
774 781
   </ItemGroup>
775 782
   <ItemGroup>
776 783
     <Folder Include="Areas\About\Models\" />
@@ -899,8 +906,8 @@
899 906
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
900 907
     </PropertyGroup>
901 908
     <Error Condition="!Exists('..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets'))" />
902
-    <Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props'))" />
903
-    <Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
909
+    <Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.2.6.1\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.2.6.1\build\Microsoft.Net.Compilers.props'))" />
910
+    <Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
904 911
   </Target>
905 912
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
906 913
        Other similar extension points exist, see Microsoft.Common.targets.

+ 13
- 13
Teknik/Web.config View File

@@ -1,4 +1,4 @@
1
-<?xml version="1.0" encoding="utf-8"?>
1
+<?xml version="1.0" encoding="utf-8"?>
2 2
 <!--
3 3
   For more information on how to configure your ASP.NET application, please visit
4 4
   http://go.microsoft.com/fwlink/?LinkId=301880
@@ -6,7 +6,7 @@
6 6
 <configuration>
7 7
   <configSections>
8 8
     <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
9
-  </configSections>
9
+  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
10 10
   <connectionStrings configSource="App_Data\ConnectionStrings.config" />
11 11
   <!-- Create ConnectionStrings.config and add your connection string node-->
12 12
   <!-- 
@@ -135,7 +135,7 @@
135 135
         <add name="Access-Control-Allow-Headers" value="Authorization, Accept, Origin, Content-Type, X-Requested-With, Connection, Transfer-Encoding" />
136 136
         <add name="strict-transport-security" value="max-age=31536000; includeSubdomains; preload" />
137 137
         <add name="X-XSS-Protection" value="1; mode=block" />
138
-        <add name="Vary" value="Origin"/>
138
+        <add name="Vary" value="Origin" />
139 139
       </customHeaders>
140 140
     </httpProtocol>
141 141
     <httpErrors errorMode="Detailed" />
@@ -172,11 +172,11 @@
172 172
       </dependentAssembly>
173 173
       <dependentAssembly>
174 174
         <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
175
-        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
175
+        <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
176 176
       </dependentAssembly>
177 177
       <dependentAssembly>
178 178
         <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
179
-        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
179
+        <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
180 180
       </dependentAssembly>
181 181
     </assemblyBinding>
182 182
   </runtime>
@@ -190,16 +190,16 @@
190 190
       <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
191 191
     </providers>
192 192
   </entityFramework>
193
-  <system.data>
193
+<system.data>
194 194
     <DbProviderFactories>
195 195
       <remove invariant="MySql.Data.MySqlClient" />
196
-      <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
196
+      <add description=".Net Framework Data Provider for MySQL" invariant="MySql.Data.MySqlClient" name="MySQL Data Provider" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.10.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
197 197
     </DbProviderFactories>
198 198
   </system.data>
199
-  <system.codedom>
200
-    <compilers>
201
-      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
202
-      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
203
-    </compilers>
204
-  </system.codedom>
199
+<system.codedom>
200
+<compilers>
201
+<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
202
+<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
203
+</compilers>
204
+</system.codedom>
205 205
 </configuration>

+ 934
- 0
Teknik/docs/MySqlCommand.xml View File

@@ -0,0 +1,934 @@
1
+<docs>
2
+  <ClassSummary>
3
+    <summary>Represents a SQL statement to execute against a MySQL database. This class cannot be inherited.</summary>
4
+    <remarks>
5
+      <B>MySqlCommand</B> features the following methods for executing commands at a MySQL database:
6
+      <list type="table">
7
+        <listheader>
8
+          <term>Item</term>
9
+          <term>Description</term>
10
+        </listheader>
11
+        <item>
12
+          <term>
13
+            <a href="MySql.Data.MySqlClient.MySqlCommand.ExecuteReader_overloads.html">ExecuteReader</a>
14
+          </term>
15
+          <description>Executes commands that return rows.</description>
16
+        </item>
17
+        <item>
18
+          <term>
19
+            <a href="MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery.html">ExecuteNonQuery</a>
20
+          </term>
21
+          <description>Executes commands such as SQL INSERT, DELETE, and UPDATE statements.</description>
22
+        </item>
23
+        <item>
24
+          <term>
25
+            <a href="MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar.html">ExecuteScalar</a>
26
+          </term>
27
+          <description>Retrieves a single value (for example, an aggregate value) from a database.</description>
28
+        </item>
29
+      </list>
30
+
31
+      You can reset the <B>CommandText</B> property and reuse the <B>MySqlCommand</B>
32
+      object. However, you must close the <A
33
+	href="MySql.Data.MySqlClient.MySqlDataReader.html">MySqlDataReader</A>
34
+      before you can execute a new or previous command.
35
+
36
+      If a <A href="MySql.Data.MySqlClient.MySqlException.html">MySqlException</A> is
37
+      generated by the method executing a <B>MySqlCommand</B>, the <A
38
+	href="MySql.Data.MySqlClient.MySqlConnection.html">MySqlConnection</A>
39
+      remains open.  It is the responsibility of the programmer to close the connection.
40
+
41
+      <note>
42
+        Using the '@' symbol for paramters is now the preferred approach although the old pattern of using
43
+		'?' is still supported.  Please be aware though that using '@' can cause conflicts when user variables
44
+		are also used.  To help with this situation please see the documentation on the 'allow user variables'
45
+		connection string option.  The 'old syntax' connection string option has now been deprecated.
46
+      </note>
47
+    </remarks>
48
+
49
+    <example>
50
+      The following example creates a <A href="frlrfsystemdatasqlclientsqlcommandclasstopic.htm">MySqlCommand</A> and
51
+      a <B>MySqlConnection</B>. The <B>MySqlConnection</B> is opened and set as the <A
52
+		href="frlrfsystemdatasqlclientsqlcommandclassconnectiontopic.htm">Connection</A>
53
+      for the <B>MySqlCommand</B>. The example then calls <A
54
+		href="frlrfsystemdatasqlclientsqlcommandclassexecutenonquerytopic.htm">ExecuteNonQuery</A>,
55
+      and closes the connection. To accomplish this, the <B>ExecuteNonQuery</B> is
56
+      passed a connection string and a query string that is a SQL INSERT
57
+      statement.
58
+      <code lang="vbnet">
59
+        Public Sub InsertRow(myConnectionString As String)
60
+        &quot; If the connection string is null, use a default.
61
+        If myConnectionString = "" Then
62
+        myConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass"
63
+        End If
64
+        Dim myConnection As New MySqlConnection(myConnectionString)
65
+        Dim myInsertQuery As String = "INSERT INTO Orders (id, customerId, amount) Values(1001, 23, 30.66)"
66
+        Dim myCommand As New MySqlCommand(myInsertQuery)
67
+        myCommand.Connection = myConnection
68
+        myConnection.Open()
69
+        myCommand.ExecuteNonQuery()
70
+        myCommand.Connection.Close()
71
+        End Sub
72
+      </code>
73
+      <code lang="C#">
74
+        public void InsertRow(string myConnectionString)
75
+        {
76
+        // If the connection string is null, use a default.
77
+        if(myConnectionString == "")
78
+        {
79
+        myConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass";
80
+        }
81
+        MySqlConnection myConnection = new MySqlConnection(myConnectionString);
82
+        string myInsertQuery = "INSERT INTO Orders (id, customerId, amount) Values(1001, 23, 30.66)";
83
+        MySqlCommand myCommand = new MySqlCommand(myInsertQuery);
84
+        myCommand.Connection = myConnection;
85
+        myConnection.Open();
86
+        myCommand.ExecuteNonQuery();
87
+        myCommand.Connection.Close();
88
+        }
89
+      </code>
90
+    </example>
91
+  </ClassSummary>
92
+
93
+
94
+
95
+  <ctor1>
96
+    <overloads>
97
+      <summary>
98
+        Initializes a new instance of the MySqlCommand class.
99
+      </summary>
100
+      <example>
101
+        The following example creates a MySqlCommand and sets some of its properties.
102
+        <para></para>
103
+        <note>
104
+          This example shows how to use one of the overloaded
105
+          versions of the MySqlCommand constructor. For other examples that might be available,
106
+          see the individual overload topics.
107
+        </note>
108
+
109
+        <code lang="vbnet">
110
+          Public Sub CreateMySqlCommand()
111
+          Dim myConnection As New MySqlConnection _
112
+          ("Persist Security Info=False;database=test;server=myServer")
113
+          myConnection.Open()
114
+          Dim myTrans As MySqlTransaction = myConnection.BeginTransaction()
115
+          Dim mySelectQuery As String = "SELECT * FROM MyTable"
116
+          Dim myCommand As New MySqlCommand(mySelectQuery, myConnection, myTrans)
117
+          myCommand.CommandTimeout = 20
118
+          End Sub
119
+        </code>
120
+        <code lang="C#">
121
+          public void CreateMySqlCommand()
122
+          {
123
+          MySqlConnection myConnection = new MySqlConnection("Persist Security Info=False;
124
+          database=test;server=myServer");
125
+          myConnection.Open();
126
+          MySqlTransaction myTrans = myConnection.BeginTransaction();
127
+          string mySelectQuery = "SELECT * FROM myTable";
128
+          MySqlCommand myCommand = new MySqlCommand(mySelectQuery, myConnection,myTrans);
129
+          myCommand.CommandTimeout = 20;
130
+          }
131
+        </code>
132
+        <code lang="C++">
133
+          public:
134
+          void CreateMySqlCommand()
135
+          {
136
+          MySqlConnection* myConnection = new MySqlConnection(S"Persist Security Info=False;
137
+          database=test;server=myServer");
138
+          myConnection->Open();
139
+          MySqlTransaction* myTrans = myConnection->BeginTransaction();
140
+          String* mySelectQuery = S"SELECT * FROM myTable";
141
+          MySqlCommand* myCommand = new MySqlCommand(mySelectQuery, myConnection, myTrans);
142
+          myCommand->CommandTimeout = 20;
143
+          };
144
+        </code>
145
+      </example>
146
+    </overloads>
147
+
148
+
149
+    <summary>
150
+      Initializes a new instance of the MySqlCommand class.
151
+    </summary>
152
+    <remarks>
153
+      The base constructor initializes all fields to their default values. The
154
+      following table shows initial property values for an instance of <see cref="MySqlCommand"/>.
155
+      <list type="table">
156
+        <listheader>
157
+          <term>Properties</term>
158
+          <term>Initial Value</term>
159
+        </listheader>
160
+        <item>
161
+          <term>
162
+            <see cref="CommandText"/>
163
+          </term>
164
+          <term>empty string ("")</term>
165
+        </item>
166
+        <item>
167
+          <term>
168
+            <see cref="CommandTimeout"/>
169
+          </term>
170
+          <term>0</term>
171
+        </item>
172
+        <item>
173
+          <term>
174
+            <see cref="CommandType"/>
175
+          </term>
176
+          <term>CommandType.Text</term>
177
+        </item>
178
+        <item>
179
+          <term>
180
+            <see cref="Connection"/>
181
+          </term>
182
+          <term>Null</term>
183
+        </item>
184
+      </list>
185
+      <para>
186
+        You can change the value for any of these properties through a separate call to
187
+        the property.
188
+      </para>
189
+    </remarks>
190
+    <example>
191
+      The following example creates a <see cref="MySqlCommand"/> and
192
+      sets some of its properties.
193
+
194
+      <code lang="vbnet">
195
+        Public Sub CreateMySqlCommand()
196
+        Dim myCommand As New MySqlCommand()
197
+        myCommand.CommandType = CommandType.Text
198
+        End Sub
199
+      </code>
200
+      <code lang="C#">
201
+        public void CreateMySqlCommand()
202
+        {
203
+        MySqlCommand myCommand = new MySqlCommand();
204
+        myCommand.CommandType = CommandType.Text;
205
+        }
206
+      </code>
207
+    </example>
208
+  </ctor1>
209
+
210
+  <ctor2>
211
+    <summary>
212
+      Initializes a new instance of the <see cref="MySqlCommand"/> class with the text of the query.
213
+    </summary>
214
+    <param name="cmdText">The text of the query.</param>
215
+    <remarks>
216
+      When an instance of <see cref="MySqlCommand"/> is created,
217
+      the following read/write properties are set to initial values.
218
+
219
+      <list type="table">
220
+        <listheader>
221
+          <term>Properties</term>
222
+          <term>Initial Value</term>
223
+        </listheader>
224
+        <item>
225
+          <term>
226
+            <see cref="CommandText"/>
227
+          </term>
228
+          <term>
229
+            <i>cmdText</i>
230
+          </term>
231
+        </item>
232
+        <item>
233
+          <term>
234
+            <see cref="CommandTimeout"/>
235
+          </term>
236
+          <term>0</term>
237
+        </item>
238
+        <item>
239
+          <term>
240
+            <see cref="CommandType"/>
241
+          </term>
242
+          <term>CommandType.Text</term>
243
+        </item>
244
+        <item>
245
+          <term>
246
+            <see cref="Connection"/>
247
+          </term>
248
+          <term>Null</term>
249
+        </item>
250
+      </list>
251
+      <para>
252
+        You can change the value for any of these properties through a separate call to
253
+        the property.
254
+      </para>
255
+    </remarks>
256
+    <example>
257
+      The following example creates a <see cref="MySqlCommand"/> and
258
+      sets some of its properties.
259
+
260
+      <code lang="vbnet">
261
+        Public Sub CreateMySqlCommand()
262
+        Dim sql as String = "SELECT * FROM mytable"
263
+        Dim myCommand As New MySqlCommand(sql)
264
+        myCommand.CommandType = CommandType.Text
265
+        End Sub
266
+      </code>
267
+      <code lang="C#">
268
+        public void CreateMySqlCommand()
269
+        {
270
+        string sql = "SELECT * FROM mytable";
271
+        MySqlCommand myCommand = new MySqlCommand(sql);
272
+        myCommand.CommandType = CommandType.Text;
273
+        }
274
+      </code>
275
+    </example>
276
+  </ctor2>
277
+
278
+  <ctor3>
279
+    <summary>
280
+      Initializes a new instance of the <see cref="MySqlCommand"/> class
281
+      with the text of the query and a <see cref="MySqlConnection"/>.
282
+    </summary>
283
+    <param name="cmdText">The text of the query.</param>
284
+    <param name="connection">
285
+      A <see cref="MySqlConnection"/> that represents the
286
+      connection to an instance of SQL Server.
287
+    </param>
288
+    <remarks>
289
+      When an instance of <see cref="MySqlCommand"/> is created,
290
+      the following read/write properties are set to initial values.
291
+
292
+      <list type="table">
293
+        <listheader>
294
+          <term>Properties</term>
295
+          <term>Initial Value</term>
296
+        </listheader>
297
+        <item>
298
+          <term>
299
+            <see cref="CommandText"/>
300
+          </term>
301
+          <term>
302
+            <i>cmdText</i>
303
+          </term>
304
+        </item>
305
+        <item>
306
+          <term>
307
+            <see cref="CommandTimeout"/>
308
+          </term>
309
+          <term>0</term>
310
+        </item>
311
+        <item>
312
+          <term>
313
+            <see cref="CommandType"/>
314
+          </term>
315
+          <term>CommandType.Text</term>
316
+        </item>
317
+        <item>
318
+          <term>
319
+            <see cref="Connection"/>
320
+          </term>
321
+          <term>
322
+            <i>connection</i>
323
+          </term>
324
+        </item>
325
+      </list>
326
+      <para>
327
+        You can change the value for any of these properties through a separate call to
328
+        the property.
329
+      </para>
330
+    </remarks>
331
+    <example>
332
+      The following example creates a <see cref="MySqlCommand"/> and
333
+      sets some of its properties.
334
+
335
+      <code lang="vbnet">
336
+        Public Sub CreateMySqlCommand()
337
+        Dim conn as new MySqlConnection("server=myServer")
338
+        Dim sql as String = "SELECT * FROM mytable"
339
+        Dim myCommand As New MySqlCommand(sql, conn)
340
+        myCommand.CommandType = CommandType.Text
341
+        End Sub
342
+      </code>
343
+      <code lang="C#">
344
+        public void CreateMySqlCommand()
345
+        {
346
+        MySqlConnection conn = new MySqlConnection("server=myserver")
347
+        string sql = "SELECT * FROM mytable";
348
+        MySqlCommand myCommand = new MySqlCommand(sql, conn);
349
+        myCommand.CommandType = CommandType.Text;
350
+        }
351
+      </code>
352
+    </example>
353
+
354
+
355
+  </ctor3>
356
+
357
+  <ctor4>
358
+    <summary>
359
+      Initializes a new instance of the <see cref="MySqlCommand"/> class
360
+      with the text of the query, a <see cref="MySqlConnection"/>, and the
361
+      <see cref="MySqlTransaction"/>.
362
+    </summary>
363
+
364
+    <param name="cmdText">The text of the query.</param>
365
+    <param name="connection">
366
+      A <see cref="MySqlConnection"/> that represents the
367
+      connection to an instance of SQL Server.
368
+    </param>
369
+    <param name="transaction">
370
+      The <see cref="MySqlTransaction"/> in which the <see cref="MySqlCommand"/> executes.
371
+    </param>
372
+    <remarks>
373
+      When an instance of <see cref="MySqlCommand"/> is created,
374
+      the following read/write properties are set to initial values.
375
+
376
+      <list type="table">
377
+        <listheader>
378
+          <term>Properties</term>
379
+          <term>Initial Value</term>
380
+        </listheader>
381
+        <item>
382
+          <term>
383
+            <see cref="CommandText"/>
384
+          </term>
385
+          <term>
386
+            <i>cmdText</i>
387
+          </term>
388
+        </item>
389
+        <item>
390
+          <term>
391
+            <see cref="CommandTimeout"/>
392
+          </term>
393
+          <term>0</term>
394
+        </item>
395
+        <item>
396
+          <term>
397
+            <see cref="CommandType"/>
398
+          </term>
399
+          <term>CommandType.Text</term>
400
+        </item>
401
+        <item>
402
+          <term>
403
+            <see cref="Connection"/>
404
+          </term>
405
+          <term>
406
+            <i>connection</i>
407
+          </term>
408
+        </item>
409
+      </list>
410
+      <para>
411
+        You can change the value for any of these properties through a separate call to
412
+        the property.
413
+      </para>
414
+    </remarks>
415
+    <example>
416
+      The following example creates a <see cref="MySqlCommand"/> and
417
+      sets some of its properties.
418
+
419
+      <code lang="vbnet">
420
+        Public Sub CreateMySqlCommand()
421
+        Dim conn as new MySqlConnection("server=myServer")
422
+        conn.Open();
423
+        Dim txn as MySqlTransaction = conn.BeginTransaction()
424
+        Dim sql as String = "SELECT * FROM mytable"
425
+        Dim myCommand As New MySqlCommand(sql, conn, txn)
426
+        myCommand.CommandType = CommandType.Text
427
+        End Sub
428
+      </code>
429
+      <code lang="C#">
430
+        public void CreateMySqlCommand()
431
+        {
432
+        MySqlConnection conn = new MySqlConnection("server=myserver")
433
+        conn.Open();
434
+        MySqlTransaction txn = conn.BeginTransaction();
435
+        string sql = "SELECT * FROM mytable";
436
+        MySqlCommand myCommand = new MySqlCommand(sql, conn, txn);
437
+        myCommand.CommandType = CommandType.Text;
438
+        }
439
+      </code>
440
+    </example>
441
+
442
+  </ctor4>
443
+
444
+
445
+
446
+
447
+  <ExecuteNonQuery>
448
+    <summary>
449
+      Executes a SQL statement against the connection and returns the number of rows affected.
450
+    </summary>
451
+    <returns>Number of rows affected</returns>
452
+    <remarks>
453
+      You can use ExecuteNonQuery to perform any type of database operation,
454
+      however any resultsets returned will not be available.  Any output parameters
455
+      used in calling a stored procedure will be populated with data and can be
456
+      retrieved after execution is complete.
457
+      For UPDATE, INSERT, and DELETE statements, the return value is the number
458
+      of rows affected by the command.  For all other types of statements, the return
459
+      value is -1.
460
+    </remarks>
461
+    <example>
462
+      The following example creates a MySqlCommand and then
463
+      executes it using ExecuteNonQuery. The example is passed a string that is a
464
+      SQL statement (such as UPDATE, INSERT, or DELETE) and a string to use to
465
+      connect to the data source.
466
+      <code lang="vbnet">
467
+        Public Sub CreateMySqlCommand(myExecuteQuery As String, myConnection As MySqlConnection)
468
+        Dim myCommand As New MySqlCommand(myExecuteQuery, myConnection)
469
+        myCommand.Connection.Open()
470
+        myCommand.ExecuteNonQuery()
471
+        myConnection.Close()
472
+        End Sub
473
+      </code>
474
+      <code lang="C#">
475
+        public void CreateMySqlCommand(string myExecuteQuery, MySqlConnection myConnection)
476
+        {
477
+        MySqlCommand myCommand = new MySqlCommand(myExecuteQuery, myConnection);
478
+        myCommand.Connection.Open();
479
+        myCommand.ExecuteNonQuery();
480
+        myConnection.Close();
481
+        }
482
+      </code>
483
+    </example>
484
+  </ExecuteNonQuery>
485
+
486
+  <ExecuteReader1>
487
+    <summary>
488
+      Sends the <see cref="CommandText"/> to the <see cref="MySqlConnection">Connection</see>,
489
+      and builds a <see cref="MySqlDataReader"/> using one of the <see cref="CommandBehavior"/> values.
490
+    </summary>
491
+    <param name="behavior">
492
+      One of the <see cref="CommandBehavior"/> values.
493
+    </param>
494
+    <remarks>
495
+      <para>
496
+        When the <see cref="CommandType"/> property is set to <B>StoredProcedure</B>,
497
+        the <see cref="CommandText"/> property should be set to the name of the stored
498
+        procedure. The command executes this stored procedure when you call
499
+        <B>ExecuteReader</B>.
500
+      </para>
501
+      <para>
502
+        The <see cref="MySqlDataReader"/> supports a special mode that enables large binary
503
+        values to be read efficiently. For more information, see the <B>SequentialAccess</B>
504
+        setting for <see cref="CommandBehavior"/>.
505
+      </para>
506
+      <para>
507
+        While the <see cref="MySqlDataReader"/> is in use, the associated
508
+        <see cref="MySqlConnection"/> is busy serving the <B>MySqlDataReader</B>.
509
+        While in this state, no other operations can be performed on the
510
+        <B>MySqlConnection</B> other than closing it. This is the case until the
511
+        <see cref="MySqlDataReader.Close"/> method of the <B>MySqlDataReader</B> is called.
512
+        If the <B>MySqlDataReader</B> is created with <B>CommandBehavior</B> set to
513
+        <B>CloseConnection</B>, closing the <B>MySqlDataReader</B> closes the connection
514
+        automatically.
515
+      </para>
516
+      <note>
517
+        When calling ExecuteReader with the SingleRow behavior, you should be aware that using a <i>limit</i>
518
+        clause in your SQL will cause all rows (up to the limit given) to be retrieved by the client.  The
519
+        <see cref="MySqlDataReader.Read"/> method will still return false after the first row but pulling all rows of data
520
+        into the client will have a performance impact.  If the <i>limit</i> clause is not necessary, it should
521
+        be avoided.
522
+      </note>
523
+    </remarks>
524
+    <returns>
525
+      A <see cref="MySqlDataReader"/> object.
526
+    </returns>
527
+  </ExecuteReader1>
528
+
529
+
530
+  <ExecuteReader>
531
+    <summary>
532
+      Sends the <see cref="CommandText"/> to the <see cref="MySqlConnection">Connection</see>
533
+      and builds a <see cref="MySqlDataReader"/>.
534
+    </summary>
535
+    <returns>
536
+      A <see cref="MySqlDataReader"/> object.
537
+    </returns>
538
+    <remarks>
539
+      <para>
540
+        When the <see cref="CommandType"/> property is set to <B>StoredProcedure</B>,
541
+        the <see cref="CommandText"/> property should be set to the name of the stored
542
+        procedure. The command executes this stored procedure when you call
543
+        <B>ExecuteReader</B>.
544
+      </para>
545
+      <para>
546
+        While the <see cref="MySqlDataReader"/> is in use, the associated
547
+        <see cref="MySqlConnection"/> is busy serving the <B>MySqlDataReader</B>.
548
+        While in this state, no other operations can be performed on the
549
+        <B>MySqlConnection</B> other than closing it. This is the case until the
550
+        <see cref="MySqlDataReader.Close"/> method of the <B>MySqlDataReader</B> is called.
551
+      </para>
552
+    </remarks>
553
+    <example>
554
+      The following example creates a <see cref="MySqlCommand"/>, then executes it by
555
+      passing a string that is a SQL SELECT statement, and a string to use to connect to the
556
+      data source.
557
+      <code lang="vbnet">
558
+        Public Sub CreateMySqlDataReader(mySelectQuery As String, myConnection As MySqlConnection)
559
+        Dim myCommand As New MySqlCommand(mySelectQuery, myConnection)
560
+        myConnection.Open()
561
+        Dim myReader As MySqlDataReader
562
+        myReader = myCommand.ExecuteReader()
563
+        Try
564
+        While myReader.Read()
565
+        Console.WriteLine(myReader.GetString(0))
566
+        End While
567
+        Finally
568
+        myReader.Close
569
+        myConnection.Close
570
+        End Try
571
+        End Sub
572
+      </code>
573
+      <code lang="C#">
574
+        public void CreateMySqlDataReader(string mySelectQuery, MySqlConnection myConnection)
575
+        {
576
+        MySqlCommand myCommand = new MySqlCommand(mySelectQuery, myConnection);
577
+        myConnection.Open();
578
+        MMySqlDataReader myReader;
579
+        myReader = myCommand.ExecuteReader();
580
+        try
581
+        {
582
+        while(myReader.Read())
583
+        {
584
+        Console.WriteLine(myReader.GetString(0));
585
+        }
586
+        }
587
+        finally
588
+        {
589
+        myReader.Close();
590
+        myConnection.Close();
591
+        }
592
+        }
593
+      </code>
594
+    </example>
595
+  </ExecuteReader>
596
+
597
+
598
+  <Prepare>
599
+    <summary>
600
+      Creates a prepared version of the command on an instance of MySQL Server.
601
+    </summary>
602
+    <remarks>
603
+      <para>
604
+        Prepared statements are only supported on MySQL version 4.1 and higher.  Calling
605
+        prepare while connected to earlier versions of MySQL will succeed but will execute
606
+        the statement in the same way as unprepared.
607
+      </para>
608
+    </remarks>
609
+    <example>
610
+      The following example demonstrates the use of the <b>Prepare</b> method.
611
+      <code lang="VB.NET">
612
+        public sub PrepareExample()
613
+        Dim cmd as New MySqlCommand("INSERT INTO mytable VALUES (@val)", myConnection)
614
+        cmd.Parameters.Add( "@val", 10 )
615
+        cmd.Prepare()
616
+        cmd.ExecuteNonQuery()
617
+
618
+        cmd.Parameters(0).Value = 20
619
+        cmd.ExecuteNonQuery()
620
+        end sub
621
+      </code>
622
+      <code lang="C#">
623
+        private void PrepareExample()
624
+        {
625
+        MySqlCommand cmd = new MySqlCommand("INSERT INTO mytable VALUES (@val)", myConnection);
626
+        cmd.Parameters.Add( "@val", 10 );
627
+        cmd.Prepare();
628
+        cmd.ExecuteNonQuery();
629
+
630
+        cmd.Parameters[0].Value = 20;
631
+        cmd.ExecuteNonQuery();
632
+        }
633
+      </code>
634
+    </example>
635
+  </Prepare>
636
+
637
+  <ExecuteScalar>
638
+    <summary>
639
+      Executes the query, and returns the first column of the first row in the
640
+      result set returned by the query. Extra columns or rows are ignored.
641
+    </summary>
642
+    <returns>
643
+      The first column of the first row in the result set, or a null reference if the
644
+      result set is empty
645
+    </returns>
646
+    <remarks>
647
+      <para>
648
+        Use the <B>ExecuteScalar</B> method to retrieve a single value (for example,
649
+        an aggregate value) from a database. This requires less code than using the
650
+        <see cref="ExecuteReader()"/> method, and then performing the operations necessary
651
+        to generate the single value using the data returned by a <see cref="MySqlDataReader"/>
652
+      </para>
653
+    </remarks>
654
+    <example>
655
+      The following example creates a <see cref="MySqlCommand"/> and then
656
+      executes it using <B>ExecuteScalar</B>. The example is passed a string that is a
657
+      SQL statement that returns an aggregate result, and a string to use to
658
+      connect to the data source.
659
+
660
+      <code lang="vbnet">
661
+        Public Sub CreateMySqlCommand(myScalarQuery As String, myConnection As MySqlConnection)
662
+        Dim myCommand As New MySqlCommand(myScalarQuery, myConnection)
663
+        myCommand.Connection.Open()
664
+        myCommand.ExecuteScalar()
665
+        myConnection.Close()
666
+        End Sub
667
+      </code>
668
+      <code lang="C#">
669
+        public void CreateMySqlCommand(string myScalarQuery, MySqlConnection myConnection)
670
+        {
671
+        MySqlCommand myCommand = new MySqlCommand(myScalarQuery, myConnection);
672
+        myCommand.Connection.Open();
673
+        myCommand.ExecuteScalar();
674
+        myConnection.Close();
675
+        }
676
+      </code>
677
+      <code lang="C++">
678
+        public:
679
+        void CreateMySqlCommand(String* myScalarQuery, MySqlConnection* myConnection)
680
+        {
681
+        MySqlCommand* myCommand = new MySqlCommand(myScalarQuery, myConnection);
682
+        myCommand-&gt;Connection-&gt;Open();
683
+        myCommand-&gt;ExecuteScalar();
684
+        myConnection-&gt;Close();
685
+        }
686
+      </code>
687
+
688
+    </example>
689
+  </ExecuteScalar>
690
+
691
+  <CommandText>
692
+    <summary>
693
+      Gets or sets the SQL statement to execute at the data source.
694
+    </summary>
695
+    <value>
696
+      The SQL statement or stored procedure to execute. The default is an empty string.
697
+    </value>
698
+    <remarks>
699
+      <para>
700
+        When the <see cref="CommandType"/> property is set to <B>StoredProcedure</B>,
701
+        the <B>CommandText</B> property should be set to the name of the stored procedure.
702
+        The user may be required to use escape character syntax if the stored procedure name
703
+        contains any special characters. The command executes this stored procedure when
704
+        you call one of the Execute methods.  Starting with Connector/Net 5.0, having both a stored function
705
+        and stored procedure with the same name in the same database is not supported.  It is
706
+        suggested that you provide unqiue names for your stored routines.
707
+      </para>
708
+    </remarks>
709
+    <example>
710
+      The following example creates a <see cref="MySqlCommand"/> and sets some of its properties.
711
+      <code lang="vbnet">
712
+        Public Sub CreateMySqlCommand()
713
+        Dim myCommand As New MySqlCommand()
714
+        myCommand.CommandText = "SELECT * FROM Mytable ORDER BY id"
715
+        myCommand.CommandType = CommandType.Text
716
+        End Sub
717
+      </code>
718
+      <code lang="C#">
719
+        public void CreateMySqlCommand()
720
+        {
721
+        MySqlCommand myCommand = new MySqlCommand();
722
+        myCommand.CommandText = "SELECT * FROM mytable ORDER BY id";
723
+        myCommand.CommandType = CommandType.Text;
724
+        }
725
+      </code>
726
+    </example>
727
+  </CommandText>
728
+
729
+  <CommandTimeout>
730
+    <summary>
731
+      Gets or sets the wait time before terminating the attempt to execute a command
732
+      and generating an error.
733
+    </summary>
734
+    <value>
735
+      The time (in seconds) to wait for the command to execute. The default is 30
736
+      seconds.
737
+    </value>
738
+    <remarks>
739
+      CommandTimeout is dependent on the ability of MySQL to cancel an executing query.
740
+      Because of this, CommandTimeout is only supported when connected to MySQL
741
+      version 5.0.0 or higher.
742
+    </remarks>
743
+  </CommandTimeout>
744
+
745
+  <CommandType>
746
+    <summary>
747
+      Gets or sets a value indicating how the <see cref="CommandText"/> property is to be interpreted.
748
+    </summary>
749
+    <value>
750
+      One of the <see cref="System.Data.CommandType"/> values. The default is <B>Text</B>.
751
+    </value>
752
+    <remarks>
753
+      <para>
754
+        When you set the <B>CommandType</B> property to <B>StoredProcedure</B>, you
755
+        should set the <see cref="CommandText"/> property to the name of the stored
756
+        procedure. The command executes this stored procedure when you call one of the
757
+        Execute methods.
758
+      </para>
759
+    </remarks>
760
+    <example>
761
+      The following example creates a <see cref="MySqlCommand"/> and sets some of its properties.
762
+      <code lang="vbnet">
763
+        Public Sub CreateMySqlCommand()
764
+        Dim myCommand As New MySqlCommand()
765
+        myCommand.CommandType = CommandType.Text
766
+        End Sub
767
+      </code>
768
+      <code lang="C#">
769
+        public void CreateMySqlCommand()
770
+        {
771
+        MySqlCommand myCommand = new MySqlCommand();
772
+        myCommand.CommandType = CommandType.Text;
773
+        }
774
+      </code>
775
+    </example>
776
+  </CommandType>
777
+
778
+
779
+
780
+
781
+
782
+  <Connection>
783
+    <summary>
784
+      Gets or sets the <see cref="MySqlConnection"/> used by this instance of the
785
+      <see cref="MySqlCommand"/>.
786
+    </summary>
787
+    <value>
788
+      The connection to a data source. The default value is a null reference
789
+      (<B>Nothing</B> in Visual Basic).
790
+    </value>
791
+    <remarks>
792
+      <para>
793
+        If you set <B>Connection</B> while a transaction is in progress and the
794
+        <see cref="Transaction"/> property is not null, an <see cref="InvalidOperationException"/>
795
+        is generated. If the <B>Transaction</B> property is not null and the transaction
796
+        has already been committed or rolled back, <B>Transaction</B> is set to
797
+        null.
798
+      </para>
799
+    </remarks>
800
+    <example>
801
+      The following example creates a <see cref="MySqlCommand"/> and sets some of its properties.
802
+      <code lang="vbnet">
803
+        Public Sub CreateMySqlCommand()
804
+        Dim mySelectQuery As String = "SELECT * FROM mytable ORDER BY id"
805
+        Dim myConnectString As String = "Persist Security Info=False;database=test;server=myServer"
806
+        Dim myCommand As New MySqlCommand(mySelectQuery)
807
+        myCommand.Connection = New MySqlConnection(myConnectString)
808
+        myCommand.CommandType = CommandType.Text
809
+        End Sub
810
+      </code>
811
+      <code lang="C#">
812
+        public void CreateMySqlCommand()
813
+        {
814
+        string mySelectQuery = "SELECT * FROM mytable ORDER BY id";
815
+        string myConnectString = "Persist Security Info=False;database=test;server=myServer";
816
+        MySqlCommand myCommand = new MySqlCommand(mySelectQuery);
817
+        myCommand.Connection = new MySqlConnection(myConnectString);
818
+        myCommand.CommandType = CommandType.Text;
819
+        }
820
+      </code>
821
+    </example>
822
+  </Connection>
823
+
824
+  <IsPrepared>
825
+  </IsPrepared>
826
+
827
+  <LastInsertedId>
828
+    <summary>Provides the id of the last inserted row.</summary>
829
+    <value>
830
+      Id of the last inserted row.  -1 if none exists.
831
+    </value>
832
+    <remarks>
833
+      An important point to remember is that this property can be used
834
+      in batch SQL scenarios but it's important to remember that it will
835
+      only reflect the insert id from the last insert statement in the batch.
836
+
837
+      This property can also be used when the batch includes select statements
838
+      and ExecuteReader is used.  This property can be consulted during result set
839
+      processing.
840
+    </remarks>
841
+  </LastInsertedId>
842
+
843
+  <Parameters>
844
+    <summary>
845
+      Get the <see cref="MySqlParameterCollection"/>
846
+    </summary>
847
+    <value>
848
+      The parameters of the SQL statement or stored procedure. The default is
849
+      an empty collection.
850
+    </value>
851
+    <remarks>
852
+      Connector/Net does not support unnamed parameters.  Every parameter added to the collection must
853
+      have an associated name.
854
+    </remarks>
855
+    <example>
856
+      The following example creates a <see cref="MySqlCommand"/> and displays its parameters.
857
+      To accomplish this, the method is passed a <see cref="MySqlConnection"/>, a query string
858
+      that is a SQL SELECT statement, and an array of <see cref="MySqlParameter"/> objects.
859
+      <code lang="vbnet">
860
+        Public Sub CreateMySqlCommand(myConnection As MySqlConnection, _
861
+        mySelectQuery As String, myParamArray() As MySqlParameter)
862
+        Dim myCommand As New MySqlCommand(mySelectQuery, myConnection)
863
+        myCommand.CommandText = "SELECT id, name FROM mytable WHERE age=@age"
864
+        myCommand.UpdatedRowSource = UpdateRowSource.Both
865
+        myCommand.Parameters.Add(myParamArray)
866
+        Dim j As Integer
867
+        For j = 0 To myCommand.Parameters.Count - 1
868
+        myCommand.Parameters.Add(myParamArray(j))
869
+        Next j
870
+        Dim myMessage As String = ""
871
+        Dim i As Integer
872
+        For i = 0 To myCommand.Parameters.Count - 1
873
+        myMessage += myCommand.Parameters(i).ToString() &amp; ControlChars.Cr
874
+        Next i
875
+        Console.WriteLine(myMessage)
876
+        End Sub
877
+      </code>
878
+      <code lang="C#">
879
+        public void CreateMySqlCommand(MySqlConnection myConnection, string mySelectQuery,
880
+        MySqlParameter[] myParamArray)
881
+        {
882
+        MySqlCommand myCommand = new MySqlCommand(mySelectQuery, myConnection);
883
+        myCommand.CommandText = "SELECT id, name FROM mytable WHERE age=@age";
884
+        myCommand.Parameters.Add(myParamArray);
885
+        for (int j=0; j&lt;myParamArray.Length; j++)
886
+        {
887
+        myCommand.Parameters.Add(myParamArray[j]) ;
888
+        }
889
+        string myMessage = "";
890
+        for (int i = 0; i &lt; myCommand.Parameters.Count; i++)
891
+        {
892
+        myMessage += myCommand.Parameters[i].ToString() + "\n";
893
+        }
894
+        MessageBox.Show(myMessage);
895
+        }
896
+      </code>
897
+    </example>
898
+  </Parameters>
899
+
900
+  <Transaction>
901
+    <summary>
902
+      Gets or sets the <see cref="MySqlTransaction"/> within which the <see cref="MySqlCommand"/> executes.
903
+    </summary>
904
+    <value>
905
+      The <see cref="MySqlTransaction"/>.  The default value is a null reference (<B>Nothing</B> in Visual Basic).
906
+    </value>
907
+    <remarks>
908
+      You cannot set the <B>Transaction</B> property if it is already set to a
909
+      specific value, and the command is in the process of executing. If you set the
910
+      transaction property to a <see cref="MySqlTransaction"/> object that is not connected
911
+      to the same <see cref="MySqlConnection"/> as the <see cref="MySqlCommand"/> object,
912
+      an exception will be thrown the next time you attempt to execute a statement.
913
+    </remarks>
914
+  </Transaction>
915
+
916
+  <UpdatedRowSource>
917
+    <summary>
918
+      Gets or sets how command results are applied to the <see cref="DataRow"/>
919
+      when used by the <see cref="System.Data.Common.DbDataAdapter.Update"/> method
920
+      of the <see cref="System.Data.Common.DbDataAdapter"/>.
921
+    </summary>
922
+    <value>
923
+      One of the <see cref="UpdateRowSource"/> values.
924
+    </value>
925
+    <remarks>
926
+      <para>
927
+        The default <see cref="System.Data.UpdateRowSource"/> value is
928
+        <B>Both</B> unless the command is automatically generated (as in the case of the
929
+        <see cref="MySqlCommandBuilder"/>), in which case the default is <B>None</B>.
930
+      </para>
931
+    </remarks>
932
+  </UpdatedRowSource>
933
+
934
+</docs>

+ 321
- 0
Teknik/docs/MySqlCommandBuilder.xml View File

@@ -0,0 +1,321 @@
1
+<docs>
2
+  <class>
3
+    <summary>
4
+      Automatically generates single-table commands used to reconcile changes made to a DataSet with the associated MySQL database. This class cannot be inherited.
5
+    </summary>
6
+    <remarks>
7
+      <para>
8
+        The <see cref="MySqlDataAdapter"/> does not automatically generate the SQL statements required to
9
+        reconcile changes made to a <see cref="System.Data.DataSet">DataSet</see> with the associated instance of MySQL.
10
+        However, you can create a <B>MySqlCommandBuilder</B> object to automatically generate SQL statements for
11
+        single-table updates if you set the <see cref="MySqlDataAdapter.SelectCommand">SelectCommand</see> property
12
+        of the <B>MySqlDataAdapter</B>. Then, any additional SQL statements that you do not set are generated by the
13
+        <B>MySqlCommandBuilder</B>.
14
+      </para>
15
+
16
+      <para>
17
+        The <B>MySqlCommandBuilder</B> registers itself as a listener for <see cref="MySqlDataAdapter.OnRowUpdating">RowUpdating</see>
18
+        events whenever you set the <see cref="DataAdapter"/> property. You can only associate one
19
+        <B>MySqlDataAdapter</B> or <B>MySqlCommandBuilder</B> object with each other at one time.
20
+      </para>
21
+
22
+      <para>
23
+        To generate INSERT, UPDATE, or DELETE statements, the <B>MySqlCommandBuilder</B> uses the
24
+        <B>SelectCommand</B> property to retrieve a required set of metadata automatically. If you change
25
+        the <B>SelectCommand</B> after the metadata has is retrieved (for example, after the first update), you
26
+        should call the <see cref="RefreshSchema"/> method to update the metadata.
27
+      </para>
28
+
29
+      <para>
30
+        The <B>SelectCommand</B> must also return at least one primary key or unique
31
+        column. If none are present, an <I>InvalidOperation</I> exception is generated,
32
+        and the commands are not generated.
33
+      </para>
34
+
35
+      <para>
36
+        The <B>MySqlCommandBuilder</B> also uses the <see cref="MySqlCommand.Connection">Connection</see>,
37
+        <see cref="MySqlCommand.CommandTimeout">CommandTimeout</see>, and <see cref="MySqlCommand.Transaction">Transaction</see>
38
+        properties referenced by the <B>SelectCommand</B>. The user should call
39
+        <B>RefreshSchema</B> if any of these properties are modified, or if the
40
+        <B>SelectCommand</B> itself is replaced. Otherwise the <see cref="MySqlDataAdapter.InsertCommand">InsertCommand</see>,
41
+        <see cref="MySqlDataAdapter.UpdateCommand">UpdateCommand</see>, and
42
+        <see cref="MySqlDataAdapter.DeleteCommand">DeleteCommand</see> properties retain
43
+        their previous values.
44
+      </para>
45
+
46
+      <para>
47
+        If you call <i>Dispose</i>, the <B>MySqlCommandBuilder</B> is disassociated
48
+        from the <B>MySqlDataAdapter</B>, and the generated commands are no longer used.
49
+      </para>
50
+
51
+      <note>
52
+        Caution must be used when using MySqlCOmmandBuilder on MySql 4.0 systems.  With MySql 4.0,
53
+        database/schema information is not provided to the connector for a query.  This means that
54
+        a query that pulls columns from two identically named tables in two or more different databases
55
+        will not cause an exception to be thrown but will not work correctly.  Even more dangerous
56
+        is the situation where your select statement references database X but is executed in
57
+        database Y and both databases have tables with similar layouts.  This situation can cause
58
+        unwanted changes or deletes.
59
+        This note does not apply to MySQL versions 4.1 and later.
60
+      </note>
61
+
62
+    </remarks>
63
+
64
+    <example>
65
+      The	following example uses the <see cref="MySqlCommand"/>, along
66
+      <see cref="MySqlDataAdapter"/> and <see cref="MySqlConnection"/>, to
67
+      select rows from a data source. The example is passed an initialized
68
+      <see cref="System.Data.DataSet"/>, a connection string, a
69
+      query string that is a SQL SELECT statement, and a string that is the
70
+      name of the database table. The example then creates a <B>MySqlCommandBuilder</B>.
71
+
72
+      <code lang="vbnet">
73
+        Public Shared Function SelectRows(myConnection As String, mySelectQuery As String, myTableName As String) As DataSet
74
+        Dim myConn As New MySqlConnection(myConnection)
75
+        Dim myDataAdapter As New MySqlDataAdapter()
76
+        myDataAdapter.SelectCommand = New MySqlCommand(mySelectQuery, myConn)
77
+        Dim cb As SqlCommandBuilder = New MySqlCommandBuilder(myDataAdapter)
78
+
79
+        myConn.Open()
80
+
81
+        Dim ds As DataSet = New DataSet
82
+        myDataAdapter.Fill(ds, myTableName)
83
+
84
+        ' Code to modify data in DataSet here
85
+
86
+        ' Without the MySqlCommandBuilder this line would fail.
87
+        myDataAdapter.Update(ds, myTableName)
88
+
89
+        myConn.Close()
90
+        End Function 'SelectRows
91
+      </code>
92
+      <code lang="C#">
93
+        public static DataSet SelectRows(string myConnection, string mySelectQuery, string myTableName)
94
+        {
95
+        MySqlConnection myConn = new MySqlConnection(myConnection);
96
+        MySqlDataAdapter myDataAdapter = new MySqlDataAdapter();
97
+        myDataAdapter.SelectCommand = new MySqlCommand(mySelectQuery, myConn);
98
+        MySqlCommandBuilder cb = new MySqlCommandBuilder(myDataAdapter);
99
+
100
+        myConn.Open();
101
+
102
+        DataSet ds = new DataSet();
103
+        myDataAdapter.Fill(ds, myTableName);
104
+
105
+        //code to modify data in DataSet here
106
+
107
+        //Without the MySqlCommandBuilder this line would fail
108
+        myDataAdapter.Update(ds, myTableName);
109
+
110
+        myConn.Close();
111
+
112
+        return ds;
113
+        }
114
+
115
+      </code>
116
+    </example>
117
+  </class>
118
+
119
+  <Ctor>
120
+    <summary>
121
+      Initializes a new instance of the <see cref="MySqlCommandBuilder"/> class.
122
+    </summary>
123
+  </Ctor>
124
+
125
+  <Ctor2>
126
+    <summary>
127
+      Initializes a new instance of the <see cref="MySqlCommandBuilder"/> class
128
+      with the associated <see cref="MySqlDataAdapter"/> object.
129
+    </summary>
130
+    <param name="adapter">
131
+      The <see cref="MySqlDataAdapter"/> to use.
132
+    </param>
133
+    <remarks>
134
+      <para>
135
+        The <see cref="MySqlCommandBuilder"/> registers itself as a listener for
136
+        <see cref="MySqlDataAdapter.RowUpdating"/> events that are generated by the
137
+        <see cref="MySqlDataAdapter"/> specified in this property.
138
+      </para>
139
+      <para>
140
+        When you create a new instance <B>MySqlCommandBuilder</B>, any existing
141
+        <B>MySqlCommandBuilder</B> associated with this <B>MySqlDataAdapter</B>
142
+        is released.
143
+      </para>
144
+    </remarks>
145
+  </Ctor2>
146
+
147
+
148
+  <DataAdapter>
149
+    <summary>
150
+      Gets or sets a <see cref="MySqlDataAdapter"/> object for which SQL statements are automatically generated.
151
+    </summary>
152
+    <value>
153
+      A <see cref="MySqlDataAdapter"/> object.
154
+    </value>
155
+    <remarks>
156
+      <para>
157
+        The <see cref="MySqlCommandBuilder"/> registers itself as a listener for
158
+        <see cref="MySqlDataAdapter.RowUpdating"/> events that are generated by the
159
+        <see cref="MySqlDataAdapter"/> specified in this property.
160
+      </para>
161
+      <para>
162
+        When you create a new instance <B>MySqlCommandBuilder</B>, any existing
163
+        <B>MySqlCommandBuilder</B> associated with this <B>MySqlDataAdapter</B>
164
+        is released.
165
+      </para>
166
+    </remarks>
167
+  </DataAdapter>
168
+
169
+  <QuotePrefix>
170
+    <summary>
171
+      Gets or sets the beginning character or characters to use when specifying MySQL
172
+      database objects (for example, tables or columns) whose names contain
173
+      characters such as spaces or reserved tokens.
174
+    </summary>
175
+    <value>
176
+      The beginning character or characters to use.  The default value is `.
177
+    </value>
178
+    <remarks>
179
+      Database objects in MySQL can contain special characters such as spaces that would
180
+      make normal SQL strings impossible to correctly parse.  Use of the <b>QuotePrefix</b>
181
+      and the <see cref="QuoteSuffix"/> properties allows the <see cref="MySqlCommandBuilder"/>
182
+      to build SQL commands that handle this situation.
183
+    </remarks>
184
+  </QuotePrefix>
185
+
186
+  <QuoteSuffix>
187
+    <summary>
188
+      Gets or sets the beginning character or characters to use when specifying MySQL
189
+      database objects (for example, tables or columns) whose names contain
190
+      characters such as spaces or reserved tokens.
191
+    </summary>
192
+    <value>
193
+      The beginning character or characters to use.  The default value is `.
194
+    </value>
195
+    <remarks>
196
+      Database objects in MySQL can contain special characters such as spaces that would
197
+      make normal SQL strings impossible to correctly parse.  Use of the <see cref="QuotePrefix"/>
198
+      and the <b>QuoteSuffix</b> properties allows the <see cref="MySqlCommandBuilder"/>
199
+      to build SQL commands that handle this situation.
200
+    </remarks>
201
+  </QuoteSuffix>
202
+
203
+  <DeriveParameters>
204
+    <summary>
205
+
206
+    </summary>
207
+    <remarks>
208
+    </remarks>
209
+  </DeriveParameters>
210
+
211
+  <GetDeleteCommand>
212
+    <summary>
213
+      Gets the automatically generated <see cref="MySqlCommand"/> object
214
+      required to perform deletions on the database.
215
+    </summary>
216
+    <returns>
217
+      The <see cref="MySqlCommand"/> object generated to handle delete operations.
218
+    </returns>
219
+    <remarks>
220
+      <para>
221
+        An application can use the <B>GetDeleteCommand</B> method for informational
222
+        or troubleshooting purposes because it returns the <see cref="MySqlCommand"/>
223
+        object to be executed.
224
+      </para>
225
+      <para>
226
+        You can also use <B>GetDeleteCommand</B> as the basis of a modified command.
227
+        For example, you might call <B>GetDeleteCommand</B> and modify the
228
+        <see cref="MySqlCommand.CommandTimeout"/> value, and then explicitly set that on the
229
+        <see cref="MySqlDataAdapter"/>.
230
+      </para>
231
+      <para>
232
+        After the SQL statement is first generated, the application must explicitly
233
+        call <see cref="RefreshSchema"/> if it changes the statement in any way.
234
+        Otherwise, the <B>GetDeleteCommand</B> will be still be using information
235
+        from the previous statement, which might not be correct. The SQL statements
236
+        are first generated either when the application calls
237
+        <see cref="System.Data.Common.DataAdapter.Update"/> or <B>GetDeleteCommand</B>.
238
+      </para>
239
+    </remarks>
240
+  </GetDeleteCommand>
241
+
242
+  <GetInsertCommand>
243
+    <summary>
244
+      Gets the automatically generated <see cref="MySqlCommand"/> object
245
+      required to perform insertions on the database.
246
+    </summary>
247
+    <returns>
248
+      The <see cref="MySqlCommand"/> object generated to handle insert operations.
249
+    </returns>
250
+    <remarks>
251
+      <para>
252
+        An application can use the <B>GetInsertCommand</B> method for informational
253
+        or troubleshooting purposes because it returns the <see cref="MySqlCommand"/>
254
+        object to be executed.
255
+      </para>
256
+      <para>
257
+        You can also use the <B>GetInsertCommand</B> as the basis of a modified command.
258
+        For example, you might call <B>GetInsertCommand</B> and modify the
259
+        <see cref="MySqlCommand.CommandTimeout"/> value, and then explicitly set that on the
260
+        <see cref="MySqlDataAdapter"/>.
261
+      </para>
262
+      <para>
263
+        After the SQL statement is first generated, the application must explicitly
264
+        call <see cref="RefreshSchema"/> if it changes the statement in any way.
265
+        Otherwise, the <B>GetInsertCommand</B> will be still be using information
266
+        from the previous statement, which might not be correct. The SQL statements
267
+        are first generated either when the application calls
268
+        <see cref="System.Data.Common.DataAdapter.Update"/> or <B>GetInsertCommand</B>.
269
+      </para>
270
+    </remarks>
271
+  </GetInsertCommand>
272
+
273
+  <GetUpdateCommand>
274
+    <summary>
275
+      Gets the automatically generated <see cref="MySqlCommand"/> object
276
+      required to perform updates on the database.
277
+    </summary>
278
+    <returns>
279
+      The <see cref="MySqlCommand"/> object generated to handle update operations.
280
+    </returns>
281
+    <remarks>
282
+      <para>
283
+        An application can use the <B>GetUpdateCommand</B> method for informational
284
+        or troubleshooting purposes because it returns the <see cref="MySqlCommand"/>
285
+        object to be executed.
286
+      </para>
287
+      <para>
288
+        You can also use <B>GetUpdateCommand</B> as the basis of a modified command.
289
+        For example, you might call <B>GetUpdateCommand</B> and modify the
290
+        <see cref="MySqlCommand.CommandTimeout"/> value, and then explicitly set that on the
291
+        <see cref="MySqlDataAdapter"/>.
292
+      </para>
293
+      <para>
294
+        After the SQL statement is first generated, the application must explicitly
295
+        call <see cref="RefreshSchema"/> if it changes the statement in any way.
296
+        Otherwise, the <B>GetUpdateCommand</B> will be still be using information
297
+        from the previous statement, which might not be correct. The SQL statements
298
+        are first generated either when the application calls
299
+        <see cref="System.Data.Common.DataAdapter.Update"/> or <B>GetUpdateCommand</B>.
300
+      </para>
301
+    </remarks>
302
+  </GetUpdateCommand>
303
+
304
+  <RefreshSchema>
305
+    <summary>
306
+      Refreshes the database schema information used to generate INSERT, UPDATE, or
307
+      DELETE statements.
308
+    </summary>
309
+    <remarks>
310
+      <para>
311
+        An application should call <B>RefreshSchema</B> whenever the SELECT statement
312
+        associated with the <see cref="MySqlCommandBuilder"/> changes.
313
+      </para>
314
+      <para>
315
+        An application should call <B>RefreshSchema</B> whenever the
316
+        <see cref="MySqlDataAdapter.SelectCommand"/> value of the <see cref="MySqlDataAdapter"/> changes.
317
+      </para>
318
+    </remarks>
319
+  </RefreshSchema>
320
+
321
+</docs>

+ 1248
- 0
Teknik/docs/MySqlConnection.xml
File diff suppressed because it is too large
View File


+ 55
- 0
Teknik/docs/MySqlConnectionStringBuilder.xml View File

@@ -0,0 +1,55 @@
1
+<docs>
2
+  <Server>
3
+    <summary>
4
+      Gets or sets the name or address of the MySQL instance to connect to.
5
+    </summary>
6
+    <remarks>
7
+      If this property is not set, then the provider will attempt to
8
+      connect to <b>localhost</b> even though this property will return
9
+      <b>String.Empty</b>.
10
+    </remarks>
11
+    <example>
12
+    </example>
13
+  </Server>
14
+
15
+  <Database>
16
+    <summary>
17
+      Gets or sets the name of the database that should be selected
18
+      when the connection is first opened.
19
+    </summary>
20
+    <remarks>
21
+      There is no default for this property and, if not set, the
22
+      connection will not have a current database until one is set
23
+      using the <see cref="ChangeDatabase"/> method.
24
+    </remarks>
25
+    <example>
26
+    </example>
27
+  </Database>
28
+
29
+  <ConnectionProtocol>
30
+    <summary>
31
+      Gets or sets the connection protocol that is being used for this
32
+      connection.
33
+    </summary>
34
+    <remarks>
35
+    </remarks>
36
+    <example>
37
+    </example>
38
+  </ConnectionProtocol>
39
+
40
+
41
+  <PipeName>
42
+    <summary>
43
+      Gets or sets the name of the named pipe object that the provider
44
+      should use.
45
+    </summary>
46
+    <remarks>
47
+      This property has no effect unless the <see cref="ConnectionProtocol"/>
48
+      property has been set to <b>NamedPipe</b>.
49
+    </remarks>
50
+    <example>
51
+    </example>
52
+  </PipeName>
53
+
54
+
55
+</docs>

+ 801
- 0
Teknik/docs/MySqlDataAdapter.xml View File

@@ -0,0 +1,801 @@
1
+<docs>
2
+  <class>
3
+    <summary>
4
+      Represents a set of data commands and a database connection that are used to fill a dataset and update a MySQL database. This class cannot be inherited.
5
+    </summary>
6
+    <remarks>
7
+      <para>
8
+        The <B>MySQLDataAdapter</B>, serves as a bridge between a <see cref="System.Data.DataSet"/>
9
+        and MySQL for retrieving and saving data. The <B>MySQLDataAdapter</B> provides this
10
+        bridge by mapping <see cref="DbDataAdapter.Fill(DataSet)"/>, which changes the data in the
11
+        <B>DataSet</B> to match the data in the data source, and <see cref="System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)"/>,
12
+        which changes the data in the data source to match the data in the <B>DataSet</B>,
13
+        using the appropriate SQL statements against the data source.
14
+      </para>
15
+      <para>
16
+        When the <B>MySQLDataAdapter</B> fills a <B>DataSet</B>, it will create the necessary
17
+        tables and columns for the returned data if they do not already exist. However, primary
18
+        key information will not be included in the implicitly created schema unless the
19
+        <see cref="System.Data.MissingSchemaAction"/> property is set to <see cref="System.Data.MissingSchemaAction.AddWithKey"/>.
20
+        You may also have the <B>MySQLDataAdapter</B> create the schema of the <B>DataSet</B>,
21
+        including primary key information, before filling it with data using <see cref="System.Data.Common.DbDataAdapter.FillSchema(DataTable, SchemaType)"/>.
22
+      </para>
23
+      <para>
24
+        <B>MySQLDataAdapter</B> is used in conjunction with <see cref="MySqlConnection"/>
25
+        and <see cref="MySqlCommand"/> to increase performance when connecting to a MySQL database.
26
+      </para>
27
+      <para>
28
+        The <B>MySQLDataAdapter</B> also includes the <see cref="MySqlDataAdapter.SelectCommand"/>,
29
+        <see cref="MySqlDataAdapter.InsertCommand"/>, <see cref="MySqlDataAdapter.DeleteCommand"/>,
30
+        <see cref="MySqlDataAdapter.UpdateCommand"/>, and <see cref="DataAdapter.TableMappings"/>
31
+        properties to facilitate the loading and updating of data.
32
+      </para>
33
+      <para>
34
+        When an instance of <B>MySQLDataAdapter</B> is created, the read/write properties
35
+        are set to initial values. For a list of these values, see the <B>MySQLDataAdapter</B>
36
+        constructor.
37
+      </para>
38
+      <note>
39
+        Please be aware that the <see cref="DataColumn"/> class allows only
40
+        Int16, Int32, and Int64 to have the AutoIncrement property set.
41
+        If you plan to use autoincremement columns with MySQL, you should consider
42
+        using signed integer columns.
43
+      </note>
44
+    </remarks>
45
+
46
+    <example>
47
+      The following example creates a <see cref="MySqlCommand"/> and a <see cref="MySqlConnection"/>.
48
+      The <B>MySqlConnection</B> is opened and set as the <see cref="MySqlCommand.Connection"/> for the
49
+      <B>MySqlCommand</B>. The example then calls <see cref="MySqlCommand.ExecuteNonQuery"/>, and closes
50
+      the connection. To accomplish this, the <B>ExecuteNonQuery</B> is
51
+      passed a connection string and a query string that is a SQL INSERT
52
+      statement.
53
+      <code lang="vbnet">
54
+        Public Function SelectRows(dataSet As DataSet, connection As String, query As String) As DataSet
55
+        Dim conn As New MySqlConnection(connection)
56
+        Dim adapter As New MySqlDataAdapter()
57
+        adapter.SelectCommand = new MySqlCommand(query, conn)
58
+        adapter.Fill(dataset)
59
+        Return dataset
60
+        End Function
61
+      </code>
62
+      <code lang="C#">
63
+        public DataSet SelectRows(DataSet dataset,string connection,string query)
64
+        {
65
+        MySqlConnection conn = new MySqlConnection(connection);
66
+        MySqlDataAdapter adapter = new MySqlDataAdapter();
67
+        adapter.SelectCommand = new MySqlCommand(query, conn);
68
+        adapter.Fill(dataset);
69
+        return dataset;
70
+        }
71
+      </code>
72
+    </example>
73
+  </class>
74
+
75
+  <Ctor>
76
+    <overloads></overloads>
77
+    <summary>
78
+      Initializes a new instance of the MySqlDataAdapter class.
79
+    </summary>
80
+    <remarks>
81
+      <para>
82
+        When an instance of <see cref="MySqlDataAdapter"/> is created,
83
+        the following read/write properties are set to the following initial
84
+        values.
85
+      </para>
86
+      <list type="table">
87
+        <listheader>
88
+          <term>Properties</term>
89
+          <term>Initial Value</term>
90
+        </listheader>
91
+        <item>
92
+          <term>
93
+            <see cref="MissingMappingAction"/>
94
+          </term>
95
+          <term>
96
+            <B>MissingMappingAction.Passthrough</B>
97
+          </term>
98
+        </item>
99
+        <item>
100
+          <term>
101
+            <see cref="MissingSchemaAction"/>
102
+          </term>
103
+          <term>
104
+            <B>MissingSchemaAction.Add</B>
105
+          </term>
106
+        </item>
107
+      </list>
108
+      <para>
109
+        You can change the value of any of these properties through a separate call
110
+        to the property.
111
+      </para>
112
+    </remarks>
113
+    <example>
114
+      The following example creates a <see cref="MySqlDataAdapter"/> and sets some of
115
+      its properties.
116
+      <code lang="vbnet">
117
+        Public Sub CreateSqlDataAdapter()
118
+        Dim conn As MySqlConnection = New MySqlConnection("Data Source=localhost;" &amp; _
119
+        "database=test")
120
+        Dim da As MySqlDataAdapter = New MySqlDataAdapter
121
+        da.MissingSchemaAction = MissingSchemaAction.AddWithKey
122
+
123
+        da.SelectCommand = New MySqlCommand("SELECT id, name FROM mytable", conn)
124
+        da.InsertCommand = New MySqlCommand("INSERT INTO mytable (id, name) " &amp; _
125
+        "VALUES (@id, @name)", conn)
126
+        da.UpdateCommand = New MySqlCommand("UPDATE mytable SET id=@id, name=@name " &amp; _
127
+        "WHERE id=@oldId", conn)
128
+        da.DeleteCommand = New MySqlCommand("DELETE FROM mytable WHERE id=@id", conn)
129
+
130
+        da.InsertCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id")
131
+        da.InsertCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name")
132
+
133
+        da.UpdateCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id")
134
+        da.UpdateCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name")
135
+        da.UpdateCommand.Parameters.Add("@oldId", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original
136
+
137
+        da.DeleteCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original
138
+        End Sub
139
+      </code>
140
+      <code lang="C#">
141
+        public static void CreateSqlDataAdapter()
142
+        {
143
+        MySqlConnection conn = new MySqlConnection("Data Source=localhost;database=test");
144
+        MySqlDataAdapter da = new MySqlDataAdapter();
145
+        da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
146
+
147
+        da.SelectCommand = new MySqlCommand("SELECT id, name FROM mytable", conn);
148
+        da.InsertCommand = new MySqlCommand("INSERT INTO mytable (id, name) " +
149
+        "VALUES (@id, @name)", conn);
150
+        da.UpdateCommand = new MySqlCommand("UPDATE mytable SET id=@id, name=@name " +
151
+        "WHERE id=@oldId", conn);
152
+        da.DeleteCommand = new MySqlCommand("DELETE FROM mytable WHERE id=@id", conn);
153
+
154
+        da.InsertCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id");
155
+        da.InsertCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name");
156
+
157
+        da.UpdateCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id");
158
+        da.UpdateCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name");
159
+        da.UpdateCommand.Parameters.Add("@oldId", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original;
160
+
161
+        da.DeleteCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original;
162
+        }
163
+      </code>
164
+    </example>
165
+  </Ctor>
166
+
167
+  <Ctor1>
168
+    <summary>
169
+      Initializes a new instance of the <see cref="MySqlDataAdapter"/> class with
170
+      the specified <see cref="MySqlCommand"/> as the <see cref="SelectCommand"/>
171
+      property.
172
+    </summary>
173
+    <param name="selectCommand">
174
+      <see cref="MySqlCommand"/> that is a SQL SELECT statement or stored procedure and is set
175
+      as the <see cref="SelectCommand"/> property of the <see cref="MySqlDataAdapter"/>.
176
+    </param>
177
+    <remarks>
178
+      <para>
179
+        When an instance of <see cref="MySqlDataAdapter"/> is created,
180
+        the following read/write properties are set to the following initial
181
+        values.
182
+      </para>
183
+      <list type="table">
184
+        <listheader>
185
+          <term>Properties</term>
186
+          <term>Initial Value</term>
187
+        </listheader>
188
+        <item>
189
+          <term>
190
+            <see cref="MissingMappingAction"/>
191
+          </term>
192
+          <term>
193
+            <B>MissingMappingAction.Passthrough</B>
194
+          </term>
195
+        </item>
196
+        <item>
197
+          <term>
198
+            <see cref="MissingSchemaAction"/>
199
+          </term>
200
+          <term>
201
+            <B>MissingSchemaAction.Add</B>
202
+          </term>
203
+        </item>
204
+      </list>
205
+      <para>
206
+        You can change the value of any of these properties through a separate call
207
+        to the property.
208
+      </para>
209