kreta/Sda.DataProvider/Core/SDACommandParameterCollectionWrapper.cs
2024-03-13 00:33:46 +01:00

161 lines
3.9 KiB
C#

using System;
using System.Data;
namespace SDA.DataProvider.Core
{
public abstract class SDACommandParameterCollectionWrapper : IDataParameterCollection
{
public abstract SDACommandParameterWrapper Add(SDACommandParameterWrapper parameter);
public abstract SDACommandParameterWrapper Add(string name, SDADBType type);
public abstract SDACommandParameterWrapper Add(string name, SDADBType type, int size);
public abstract SDACommandParameterWrapper Add(string name, object value);
public abstract void Remove(SDACommandParameterWrapper parameter);
public abstract bool Contains(SDACommandParameterWrapper parameter);
public abstract int IndexOf(SDACommandParameterWrapper parameter);
public abstract void Clear();
public abstract int Count
{
get;
}
public abstract SDACommandParameterWrapper this[string name]
{
get;
set;
}
public abstract SDACommandParameterWrapper this[int index]
{
get;
set;
}
public int IndexOf(string parameterName)
{
return IndexOf(this[parameterName]);
}
public bool Contains(string parameterName)
{
return Contains(this[parameterName]);
}
public void RemoveAt(string parameterName)
{
Remove(this[parameterName]);
}
public void RemoveAt(int index)
{
Remove(this[index]);
}
#region IDataParameterCollection Members
object IDataParameterCollection.this[string parameterName]
{
get
{
return this[parameterName];
}
set
{
this[parameterName] = (SDACommandParameterWrapper)value;
}
}
#endregion
#region IList Members
bool System.Collections.IList.IsReadOnly
{
get
{
return false;
}
}
object System.Collections.IList.this[int index]
{
get
{
return this[index];
}
set
{
this[index] = (SDACommandParameterWrapper)value;
}
}
void System.Collections.IList.Insert(int index, object value)
{
throw new NotImplementedException();
}
void System.Collections.IList.Remove(object value)
{
Remove((SDACommandParameterWrapper)value);
}
bool System.Collections.IList.Contains(object value)
{
return Contains((SDACommandParameterWrapper)value);
}
int System.Collections.IList.IndexOf(object value)
{
return IndexOf((SDACommandParameterWrapper)value);
}
int System.Collections.IList.Add(object value)
{
return IndexOf(Add((SDACommandParameterWrapper)value));
}
bool System.Collections.IList.IsFixedSize
{
get
{
return false;
}
}
#endregion
#region ICollection Members
bool System.Collections.ICollection.IsSynchronized
{
get
{
return false;
}
}
void System.Collections.ICollection.CopyTo(Array array, int index)
{
throw new NotImplementedException();
}
object System.Collections.ICollection.SyncRoot
{
get
{
throw new NotImplementedException();
}
}
#endregion
#region IEnumerable Members
public virtual System.Collections.IEnumerator GetEnumerator()
{
throw new NotImplementedException();
}
#endregion
}
}