DbParameterCollection.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Data / System / Data / Common / DbParameterCollection.cs / 1 / DbParameterCollection.cs

                            //------------------------------------------------------------------------------ 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// [....] 
// [....]
//----------------------------------------------------------------------------- 
 
namespace System.Data.Common {
 
    using System;
    using System.ComponentModel;
    using System.Collections;
    using System.Data; 

#if WINFSInternalOnly 
    internal 
#else
    public 
#endif
    abstract class DbParameterCollection : MarshalByRefObject, IDataParameterCollection {

        protected DbParameterCollection() : base() { 
        }
 
        [ 
        Browsable(false),
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) 
        ]
        abstract public int Count {
            get;
        } 

        [ 
        Browsable(false), 
        EditorBrowsableAttribute(EditorBrowsableState.Never),
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) 
        ]
        abstract public bool IsFixedSize {
            get;
        } 

        [ 
        Browsable(false), 
        EditorBrowsableAttribute(EditorBrowsableState.Never),
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) 
        ]
        abstract public bool IsReadOnly {
            get;
        } 

        [ 
        Browsable(false), 
        EditorBrowsableAttribute(EditorBrowsableState.Never),
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) 
        ]
        abstract public bool IsSynchronized {
            get;
        } 

        [ 
        Browsable(false), 
        EditorBrowsableAttribute(EditorBrowsableState.Never),
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) 
        ]
        abstract public object SyncRoot {
            get;
        } 

        object IList.this[int index] { 
            get { 
                return GetParameter(index);
            } 
            set {
                SetParameter(index, (DbParameter)value);
            }
        } 

        object IDataParameterCollection.this[string parameterName] { 
            get { 
                return GetParameter(parameterName);
            } 
            set {
                SetParameter(parameterName, (DbParameter)value);
            }
        } 

        public DbParameter this[int index] { 
            get { 
                return GetParameter(index);
            } 
            set {
                SetParameter(index, value);
            }
        } 

        public DbParameter this[string parameterName] { 
            get { 
                return GetParameter(parameterName) as DbParameter;
            } 
            set {
                SetParameter(parameterName, value);
            }
        } 

        abstract public int Add(object value); 
 
        //
 
        abstract public void AddRange(System.Array values);

        //
 
        abstract public bool Contains(object value);
 
        abstract public bool Contains(string value); // WebData 97349 

        // 

        abstract public void CopyTo(System.Array array, int index);

        // 

        abstract public void Clear(); 
 
        [
        EditorBrowsableAttribute(EditorBrowsableState.Never) 
        ]
        abstract public IEnumerator GetEnumerator();

        abstract protected DbParameter GetParameter(int index); 

        abstract protected DbParameter GetParameter(string parameterName); 
 
        abstract public int IndexOf(object value);
 
        //

        abstract public int IndexOf(string parameterName);
 
        abstract public void Insert(int index, object value);
 
        abstract public void Remove(object value); 

        // 

        //

        abstract public void RemoveAt(int index); 

        abstract public void RemoveAt(string parameterName); 
 
        abstract protected void SetParameter(int index, DbParameter value);
 
        abstract protected void SetParameter(string parameterName, DbParameter value);

    }
 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK