diff options
author | Boris Kirzner <borisk@mono-cvs.ximian.com> | 2005-05-29 18:36:27 +0400 |
---|---|---|
committer | Boris Kirzner <borisk@mono-cvs.ximian.com> | 2005-05-29 18:36:27 +0400 |
commit | 32a7d770ef1bfcb29f197f0817b52d69351eb92c (patch) | |
tree | 90954ab7b88c704c5a109224d63aaff9f69e88f3 /mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs | |
parent | df9e42ed38d2b2a8461e4d3bf2d73330bf01e148 (diff) |
Changes toward common code base with TARGET_JVM
svn path=/trunk/mcs/; revision=45163
Diffstat (limited to 'mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs')
-rw-r--r-- | mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs b/mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs index 11fd1f84765..8f940f19db5 100644 --- a/mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs +++ b/mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs @@ -56,25 +56,29 @@ namespace System.Data.Common { set { this [parameterName] = (DbParameter) value; } } - object IList.this [int objA] { - get { return this [objA]; } - set { this [objA] = (DbParameter) value; } + object IList.this [int index] { + get { return this [index]; } + set { this [index] = (DbParameter) value; } } public abstract bool IsFixedSize { get; } public abstract bool IsReadOnly { get; } public abstract bool IsSynchronized { get; } - [MonoTODO] - public DbParameter this [string ulAdd] { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } + public DbParameter this [string parameterName] { + get { + int index = IndexOf (parameterName); + return this [index]; + } + set { + int index = IndexOf (parameterName); + this [index] = value; + } } - [MonoTODO] - public DbParameter this [[Optional] int ulAdd] { - get { throw new NotImplementedException (); } - set { throw new NotImplementedException (); } + public DbParameter this [[Optional] int index] { + get { return GetParameter (index); } + set { SetParameter (index,value); } } public abstract object SyncRoot { get; } @@ -84,8 +88,12 @@ namespace System.Data.Common { #region Methods public abstract int Add (object value); + +#if NET_2_0 public abstract void AddRange (Array values); protected abstract int CheckName (string parameterName); +#endif + public abstract void Clear (); public abstract bool Contains (object value); public abstract bool Contains (string value); |