File: OdbcConnectionStringBuilder.xml

package info (click to toggle)
mono-reference-assemblies 3.12.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 604,240 kB
  • ctags: 625,505
  • sloc: cs: 3,967,741; xml: 2,793,081; ansic: 418,042; java: 60,435; sh: 14,833; makefile: 11,576; sql: 7,956; perl: 1,467; cpp: 1,446; yacc: 1,203; python: 598; asm: 422; sed: 16; php: 1
file content (333 lines) | stat: -rw-r--r-- 17,911 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
<?xml version="1.0" encoding="utf-8"?>
<Type Name="OdbcConnectionStringBuilder" FullName="System.Data.Odbc.OdbcConnectionStringBuilder">
  <TypeSignature Language="C#" Value="public sealed class OdbcConnectionStringBuilder : System.Data.Common.DbConnectionStringBuilder" />
  <AssemblyInfo>
    <AssemblyName>System.Data</AssemblyName>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>System.Data.Common.DbConnectionStringBuilder</BaseTypeName>
  </Base>
  <Interfaces />
  <Attributes>
    <Attribute>
      <AttributeName>System.ComponentModel.TypeConverter("System.Data.Odbc.OdbcConnectionStringBuilder+OdbcConnectionStringBuilderConverter, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>System.ComponentModel.DefaultProperty("Driver")</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <remarks>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>The connection string builders let developers programmatically create syntactically correct connection strings, and parse and rebuild existing connection strings, using properties and methods of the class. The connection string builder provides strongly typed properties corresponding to the known key/value pairs allowed by ODBC connections, and developers can add arbitrary key/value pairs for any other connection string values. </para>
      <para>Developers needing to create connection strings as part of applications can use the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> class to build and modify connection strings. The class also makes it easy to manage connection strings stored in an application configuration file. <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> performs checks only for the limited set of known key/value pairs. Therefore, this class can be used to create invalid connection strings. The following table lists the specific known keys together with their corresponding properties within the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> class, and their default values. Besides these specific values, developers can add any key/value pairs to the collection that is contained within the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> instance.</para>
      <list type="table">
        <listheader>
          <item>
            <term>
              <para>Key</para>
            </term>
            <description>
              <para>Property</para>
            </description>
            <description>
              <para>Comment</para>
            </description>
            <description>
              <para>Default value</para>
            </description>
          </item>
        </listheader>
        <item>
          <term>
            <para>Driver</para>
          </term>
          <description>
            <para>
              <see cref="P:System.Data.Odbc.OdbcConnectionStringBuilder.Driver" />
            </para>
          </description>
          <description>
            <para>Developers should not include the braces surrounding the driver name when they set the <see cref="P:System.Data.Odbc.OdbcConnectionStringBuilder.Driver" /> property. The <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> instance adds braces as needed. </para>
          </description>
          <description>
            <para>Empty string</para>
          </description>
        </item>
        <item>
          <term>
            <para>DSN</para>
          </term>
          <description>
            <para>
              <see cref="P:System.Data.Odbc.OdbcConnectionStringBuilder.Dsn" />
            </para>
          </description>
          <description>
            <para>  </para>
          </description>
          <description>
            <para>Empty string</para>
          </description>
        </item>
      </list>
      <para>If any value (other than the <see cref="P:System.Data.Odbc.OdbcConnectionStringBuilder.Driver" /> value) within the connection string contains a semicolon (;), the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> surrounds the value with quotation marks in the connection string. In order to avoid this issue with the <see cref="P:System.Data.Odbc.OdbcConnectionStringBuilder.Driver" /> value that frequently contains a semicolon, the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> class always surrounds this value with braces. The ODBC specification indicates that driver values that contain semicolons must be surrounded with braces, and this class handles this for you.</para>
      <para>The <see cref="P:System.Data.Odbc.OdbcConnectionStringBuilder.Item(System.String)" /> property handles attempts to insert malicious code. For example, the following code, using the default <see cref="P:System.Data.Odbc.OdbcConnectionStringBuilder.Item(System.String)" /> property (the indexer, in C#) correctly escapes the nested key/value pair.</para>
      <para>[Visual Basic]</para>
      <code>Dim builder As _
 New System.Data.Odbc.OdbcConnectionStringBuilder
' Take advantage of the Driver property. 
builder.Driver = "SQL Server"
builder("Server") = "MyServer;NewValue=Bad"
Console.WriteLine(builder.ConnectionString)</code>
      <para>[C#]</para>
      <code>System.Data.Odbc.OdbcConnectionStringBuilder builder = 
  new System.Data.Odbc.OdbcConnectionStringBuilder();
// Take advantage of the Driver property. 
builder.Driver = "SQL Server";
builder["Server"] = "MyServer;NewValue=Bad";
Console.WriteLine(builder.ConnectionString);</code>
      <para>The result is the following connection string that handles the invalid value in a safe manner:</para>
      <code>Driver={SQL Server};Server="MyServer;NewValue=Bad"</code>
    </remarks>
    <summary>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Provides a simple way to create and manage the contents of connection strings used by the <see cref="T:System.Data.Odbc.OdbcConnection" /> class.</para>
    </summary>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public OdbcConnectionStringBuilder ();" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters />
      <Docs>
        <remarks>To be added.</remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> class.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public OdbcConnectionStringBuilder (string connectionString);" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="connectionString" Type="System.String" />
      </Parameters>
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>You can pass a connection string in the constructor, or you can set the <see cref="P:System.Data.Common.DbConnectionStringBuilder.ConnectionString" /> property explicitly. The behavior is the same either way.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> class. The provided connection string provides the data for the instance's internal connection information.</para>
        </summary>
        <param name="connectionString">
          <attribution license="cc4" from="Microsoft" modified="false" />The basis for the object's internal connection information. Parsed into key/value pairs.</param>
      </Docs>
    </Member>
    <Member MemberName="Clear">
      <MemberSignature Language="C#" Value="public override void Clear ();" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The <see cref="M:System.Data.Odbc.OdbcConnectionStringBuilder.Clear" /> method removes all key/value pairs from the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> and resets the <see cref="P:System.Data.Odbc.OdbcConnectionStringBuilder.Driver" /> and <see cref="P:System.Data.Odbc.OdbcConnectionStringBuilder.Dsn" /> properties to their default values. The <see cref="M:System.Data.Odbc.OdbcConnectionStringBuilder.Clear" /> method also sets the <see cref="P:System.Data.Common.DbConnectionStringBuilder.Count" /> property to 0 and the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder.ConnectionString" /> property to an empty string.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Clears the contents of the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> instance.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="ContainsKey">
      <MemberSignature Language="C#" Value="public override bool ContainsKey (string keyword);" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="keyword" Type="System.String" />
      </Parameters>
      <Docs>
        <remarks>To be added.</remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Determines whether the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> contains a specific key.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>true if the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> contains an element that has the specified key; otherwise false.</para>
        </returns>
        <param name="keyword">
          <attribution license="cc4" from="Microsoft" modified="false" />The key to locate in the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" />.</param>
      </Docs>
    </Member>
    <Member MemberName="Driver">
      <MemberSignature Language="C#" Value="public string Driver { set; get; }" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Attributes>
        <Attribute>
          <AttributeName>System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)</AttributeName>
        </Attribute>
        <Attribute>
          <AttributeName>System.ComponentModel.DisplayName("Driver")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>If the value passed in is null when you try to set the property, the <see cref="P:System.Data.Odbc.OdbcConnectionStringBuilder.Driver" /> property is reset. If the value has not been set and the developer tries to retrieve the property, the return value is String.Empty. This property corresponds to the "Driver" key within the connection string.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets or sets the name of the ODBC driver associated with the connection.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="Dsn">
      <MemberSignature Language="C#" Value="public string Dsn { set; get; }" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Attributes>
        <Attribute>
          <AttributeName>System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)</AttributeName>
        </Attribute>
        <Attribute>
          <AttributeName>System.ComponentModel.DisplayName("Dsn")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>If the value passed in is null when you try to set the property, the <see cref="P:System.Data.Odbc.OdbcConnectionStringBuilder.Dsn" /> property is reset. If the value has not been set and the developer tries to retrieve the property, the return value is String.Empty. This property corresponds to the "Dsn" key within the connection string.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets or sets the name of the data source name (DSN) associated with the connection.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="Item">
      <MemberSignature Language="C#" Value="public override object this[string keyword] { set; get; }" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Object</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="keyword" Type="System.String" />
      </Parameters>
      <Docs>
        <param name="keyword">To be added.</param>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Keys">
      <MemberSignature Language="C#" Value="public override System.Collections.ICollection Keys { get; }" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Collections.ICollection</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The order of the values in the <see cref="T:System.Collections.ICollection" /> is the same order as the associated values in the <see cref="T:System.Collections.ICollection" /> returned by the <see cref="P:System.Data.Common.DbConnectionStringBuilder.Values" /> property.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets an <see cref="T:System.Collections.ICollection" /> that contains the keys in the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" />.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="Remove">
      <MemberSignature Language="C#" Value="public override bool Remove (string keyword);" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="keyword" Type="System.String" />
      </Parameters>
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Because the <see cref="M:System.Data.Odbc.OdbcConnectionStringBuilder.Remove(System.String)" /> method returns a value that indicates its success, it is not required to look for the existence of a key before trying to remove the key/value pair from the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> instance.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Removes the entry with the specified key from the <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" /> instance.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>true if the key existed within the connection string and was removed; false if the key did not exist.</para>
        </returns>
        <param name="keyword">
          <attribution license="cc4" from="Microsoft" modified="false" />The key of the key/value pair to be removed from the connection string in this <see cref="T:System.Data.Odbc.OdbcConnectionStringBuilder" />.</param>
      </Docs>
    </Member>
    <Member MemberName="TryGetValue">
      <MemberSignature Language="C#" Value="public override bool TryGetValue (string keyword, out object value);" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="keyword" Type="System.String" />
        <Parameter Name="value" Type="System.Object&amp;" RefType="out" />
      </Parameters>
      <Docs>
        <param name="keyword">To be added.</param>
        <param name="value">To be added.</param>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>