* OdbcParameterTest.cs: Fixed compilation on 1.0 profile.
[mono.git] / mcs / class / System.Data / System.Data.Common / DbConnectionString.cs
1 //
2 // System.Data.Common.DbConnectionString
3 //
4 // Authors:
5 //      Tim Coleman (tim@timcoleman.com)
6 //      Sebastien Pouliot  <sebastien@ximian.com>
7 //
8 // Copyright (C) Tim Coleman, 2003
9 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30
31 #if NET_2_0
32
33 using System.Collections;
34 using System.Collections.Specialized;
35 using System.Runtime.Serialization;
36 using System.Text;
37
38 namespace System.Data.Common {
39
40         [Obsolete ()]
41         internal class DbConnectionString : DbConnectionOptions, ISerializable {
42
43                 #region Fields
44
45                 KeyRestrictionBehavior behavior;
46
47                 #endregion // Fields
48
49                 #region Constructors
50
51                 protected internal DbConnectionString (DbConnectionString constr)
52                 {
53                         options = constr.options;
54                 }
55
56                 public DbConnectionString (string connectionString)
57                         : base (connectionString)
58                 {
59                         options = new NameValueCollection ();
60                         ParseConnectionString (connectionString);
61                 }
62                 
63                 [MonoTODO]
64                 protected DbConnectionString (SerializationInfo si, StreamingContext sc)
65                 {
66                 }
67
68                 [MonoTODO]
69                 public DbConnectionString (string connectionString, string restrictions, KeyRestrictionBehavior behavior)
70                         : this (connectionString)
71                 {
72                         this.behavior = behavior;
73                 }
74
75                 #endregion // Constructors
76
77                 #region Properties
78
79                 public KeyRestrictionBehavior Behavior {
80                         get { return behavior; }
81                 }
82
83                 [MonoTODO]
84                 public string Restrictions {
85                         get { throw new NotImplementedException (); }
86                 }
87                 
88                 #endregion // Properties
89
90                 #region Methods
91
92                 [MonoTODO]
93                 public virtual void GetObjectData (SerializationInfo info, StreamingContext context)
94                 {
95                         throw new NotImplementedException ();
96                 }
97
98                 protected virtual string KeywordLookup (string keyname)
99                 {
100                         return keyname;
101                 }
102
103                 [MonoTODO]
104                 public virtual void PermissionDemand ()
105                 {
106                         throw new NotImplementedException ();
107                 }
108
109                 #endregion // Methods
110         }
111 }
112
113 #endif