160 {
162 buffer.Length = 0;
165 char c = '\0';
168 {
171 {
173 if (';' == c || char.IsWhiteSpace(c))
174 {
175 continue;
176 }
177 if (c == '\0')
178 {
180 continue;
181 }
182 if (char.IsControl(c))
183 {
184 throw ADP.ConnectionStringSyntax(
index);
185 }
187 if ('=' != c)
188 {
191 }
193 continue;
195 if ('=' == c)
196 {
198 continue;
199 }
200 if (!char.IsWhiteSpace(c) && char.IsControl(c))
201 {
202 throw ADP.ConnectionStringSyntax(
index);
203 }
207 {
210 }
212 if (
string.IsNullOrEmpty(
keyname))
213 {
214 throw ADP.ConnectionStringSyntax(
index);
215 }
216 buffer.Length = 0;
220 if (char.IsWhiteSpace(c))
221 {
222 continue;
223 }
225 {
226 if ('{' == c)
227 {
230 }
231 }
232 else
233 {
234 if ('\'' == c)
235 {
237 continue;
238 }
239 if ('"' == c)
240 {
242 continue;
243 }
244 }
245 if (';' == c || c == '\0')
246 {
247 break;
248 }
249 if (char.IsControl(c))
250 {
251 throw ADP.ConnectionStringSyntax(
index);
252 }
256 if (!char.IsWhiteSpace(c) && (char.IsControl(c) || ';' == c))
257 {
258 break;
259 }
262 if ('"' == c)
263 {
265 continue;
266 }
267 if (c == '\0')
268 {
269 throw ADP.ConnectionStringSyntax(
index);
270 }
273 if ('"' == c)
274 {
277 }
282 if ('\'' == c)
283 {
285 continue;
286 }
287 if (c == '\0')
288 {
289 throw ADP.ConnectionStringSyntax(
index);
290 }
293 if ('\'' == c)
294 {
297 }
302 if ('}' == c)
303 {
305 }
306 else if (c == '\0')
307 {
308 throw ADP.ConnectionStringSyntax(
index);
309 }
312 if ('}' == c)
313 {
316 }
321 if (char.IsWhiteSpace(c))
322 {
323 continue;
324 }
325 if (';' != c)
326 {
327 if (c == '\0')
328 {
330 continue;
331 }
332 throw ADP.ConnectionStringSyntax(
index);
333 }
334 break;
336 if (c == '\0' || char.IsWhiteSpace(c))
337 {
338 continue;
339 }
341 default:
342 {
343 throw ADP.InternalError(ADP.InternalErrorCode.InvalidParserState1);
344 }
347 continue;
348 }
349 break;
350 }
352 {
357 throw ADP.ConnectionStringSyntax(
index);
360 if (
string.IsNullOrEmpty(
keyname))
361 {
362 throw ADP.ConnectionStringSyntax(
index);
363 }
364 break;
366 {
370 {
371 throw ADP.ConnectionStringSyntax(
index);
372 }
373 break;
374 }
380 break;
381 default:
382 throw ADP.InternalError(ADP.InternalErrorCode.InvalidParserState2);
386 break;
387 }
389 {
391 }
393 }
static string GetKeyValue(StringBuilder buffer, bool trimWhitespace)
static string GetKeyName(StringBuilder buffer)