OleDbParameterCollection.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Data / System / Data / OleDb / OleDbParameterCollection.cs / 1 / OleDbParameterCollection.cs

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

    [ 
    Editor("Microsoft.VSDesigner.Data.Design.DBParametersEditor, " + AssemblyRef.MicrosoftVSDesigner, "System.Drawing.Design.UITypeEditor, " + AssemblyRef.SystemDrawing),
    ListBindable(false)
    ]
#if WINFSInternalOnly 
    internal
#else 
    public 
#endif
    sealed partial class OleDbParameterCollection : DbParameterCollection { 
        private int _changeID;

        private static Type ItemType = typeof(OleDbParameter);
 
        internal OleDbParameterCollection() : base() {
        } 
 
        internal int ChangeID {
            get { 
                return _changeID;
            }
        }
 
        [
        Browsable(false), 
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) 
        ]
        new public OleDbParameter this[int index] { 
            get {
                return (OleDbParameter)GetParameter(index);
            }
            set { 
                SetParameter(index, value);
            } 
        } 

        [ 
        Browsable(false),
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
        ]
        new public OleDbParameter this[string parameterName] { 
            get {
                 return (OleDbParameter)GetParameter(parameterName); 
            } 
            set {
                 SetParameter(parameterName, value); 
            }
        }

        public OleDbParameter Add(OleDbParameter value) { // MDAC 59206 
            Add((object)value);
            return value; 
        } 

        [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] 
        [ ObsoleteAttribute("Add(String parameterName, Object value) has been deprecated.  Use AddWithValue(String parameterName, Object value).  http://go.microsoft.com/fwlink/?linkid=14202", false) ] // 79027
        public OleDbParameter Add(string parameterName, object value) { // MDAC 59206
            return Add(new OleDbParameter(parameterName, value));
        } 

        public OleDbParameter AddWithValue(string parameterName, object value) { // MDAC 79027 
            return Add(new OleDbParameter(parameterName, value)); 
        }
 
        public OleDbParameter Add(string parameterName, OleDbType oleDbType) {
            return Add(new OleDbParameter(parameterName, oleDbType));
        }
 
        public OleDbParameter Add(string parameterName, OleDbType oleDbType, int size) {
            return Add(new OleDbParameter(parameterName, oleDbType, size)); 
        } 

        public OleDbParameter Add(string parameterName, OleDbType oleDbType, int size, string sourceColumn) { 
            return Add(new OleDbParameter(parameterName, oleDbType, size, sourceColumn));
        }

        public void AddRange(OleDbParameter[] values) { // V1.2.3300 
            AddRange((Array)values);
        } 
 
        override public bool Contains(string value) { // WebData 97349
            return (-1 != IndexOf(value)); 
        }

        public bool Contains(OleDbParameter value) {
            return (-1 != IndexOf(value)); 
        }
 
        public void CopyTo(OleDbParameter[] array, int index) { 
            CopyTo((Array)array, index);
        } 

        public int IndexOf(OleDbParameter value) {
            return IndexOf((object)value);
        } 

        public void Insert(int index, OleDbParameter value) { 
            Insert(index, (object)value); 
        }
 
        private void OnChange() {
            unchecked { _changeID++; }
        }
 
        public void Remove(OleDbParameter value) {
            Remove((object)value); 
        } 

    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// [....] 
// [....]
//----------------------------------------------------------------------------- 
 
namespace System.Data.OleDb {
 
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Data; 
    using System.Data.Common;
    using System.Data.ProviderBase; 
    using System.Diagnostics; 

    [ 
    Editor("Microsoft.VSDesigner.Data.Design.DBParametersEditor, " + AssemblyRef.MicrosoftVSDesigner, "System.Drawing.Design.UITypeEditor, " + AssemblyRef.SystemDrawing),
    ListBindable(false)
    ]
#if WINFSInternalOnly 
    internal
#else 
    public 
#endif
    sealed partial class OleDbParameterCollection : DbParameterCollection { 
        private int _changeID;

        private static Type ItemType = typeof(OleDbParameter);
 
        internal OleDbParameterCollection() : base() {
        } 
 
        internal int ChangeID {
            get { 
                return _changeID;
            }
        }
 
        [
        Browsable(false), 
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) 
        ]
        new public OleDbParameter this[int index] { 
            get {
                return (OleDbParameter)GetParameter(index);
            }
            set { 
                SetParameter(index, value);
            } 
        } 

        [ 
        Browsable(false),
        DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
        ]
        new public OleDbParameter this[string parameterName] { 
            get {
                 return (OleDbParameter)GetParameter(parameterName); 
            } 
            set {
                 SetParameter(parameterName, value); 
            }
        }

        public OleDbParameter Add(OleDbParameter value) { // MDAC 59206 
            Add((object)value);
            return value; 
        } 

        [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] 
        [ ObsoleteAttribute("Add(String parameterName, Object value) has been deprecated.  Use AddWithValue(String parameterName, Object value).  http://go.microsoft.com/fwlink/?linkid=14202", false) ] // 79027
        public OleDbParameter Add(string parameterName, object value) { // MDAC 59206
            return Add(new OleDbParameter(parameterName, value));
        } 

        public OleDbParameter AddWithValue(string parameterName, object value) { // MDAC 79027 
            return Add(new OleDbParameter(parameterName, value)); 
        }
 
        public OleDbParameter Add(string parameterName, OleDbType oleDbType) {
            return Add(new OleDbParameter(parameterName, oleDbType));
        }
 
        public OleDbParameter Add(string parameterName, OleDbType oleDbType, int size) {
            return Add(new OleDbParameter(parameterName, oleDbType, size)); 
        } 

        public OleDbParameter Add(string parameterName, OleDbType oleDbType, int size, string sourceColumn) { 
            return Add(new OleDbParameter(parameterName, oleDbType, size, sourceColumn));
        }

        public void AddRange(OleDbParameter[] values) { // V1.2.3300 
            AddRange((Array)values);
        } 
 
        override public bool Contains(string value) { // WebData 97349
            return (-1 != IndexOf(value)); 
        }

        public bool Contains(OleDbParameter value) {
            return (-1 != IndexOf(value)); 
        }
 
        public void CopyTo(OleDbParameter[] array, int index) { 
            CopyTo((Array)array, index);
        } 

        public int IndexOf(OleDbParameter value) {
            return IndexOf((object)value);
        } 

        public void Insert(int index, OleDbParameter value) { 
            Insert(index, (object)value); 
        }
 
        private void OnChange() {
            unchecked { _changeID++; }
        }
 
        public void Remove(OleDbParameter value) {
            Remove((object)value); 
        } 

    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

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