Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / System.Data / System / Data / Common / DBParameter.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="DbParameter.cs" company="Microsoft">
3 //      Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 // <owner current="true" primary="true">[....]</owner>
6 // <owner current="true" primary="false">[....]</owner>
7 //------------------------------------------------------------------------------
8
9 namespace System.Data.Common {
10
11     using System;
12     using System.ComponentModel;
13     using System.Data;
14
15     public abstract class DbParameter : MarshalByRefObject, IDbDataParameter { // V1.2.3300
16
17         protected DbParameter() : base() {
18         }
19
20         [
21         Browsable(false),
22         DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
23         RefreshProperties(RefreshProperties.All),
24         ResCategoryAttribute(Res.DataCategory_Data),
25         ResDescriptionAttribute(Res.DbParameter_DbType),
26         ]
27         abstract public DbType DbType {
28             get;
29             set;
30         }
31
32         [
33         EditorBrowsableAttribute(EditorBrowsableState.Advanced)
34         ]
35         public abstract void ResetDbType();
36
37         [
38         DefaultValue(ParameterDirection.Input),
39         RefreshProperties(RefreshProperties.All),
40         ResCategoryAttribute(Res.DataCategory_Data),
41         ResDescriptionAttribute(Res.DbParameter_Direction),
42         ]
43         abstract public ParameterDirection Direction {
44             get;
45             set;
46         }
47
48         [
49         Browsable(false),
50         DesignOnly(true),
51         EditorBrowsableAttribute(EditorBrowsableState.Never)
52         ]
53         abstract public Boolean IsNullable {
54             get;
55             set;
56         }
57
58         [
59         DefaultValue(""),
60         ResCategoryAttribute(Res.DataCategory_Data),
61         ResDescriptionAttribute(Res.DbParameter_ParameterName),
62         ]
63         abstract public String ParameterName {
64             get;
65             set;
66         }
67
68         byte IDbDataParameter.Precision { // SqlProjectTracking 17233
69             get {
70                 return 0;
71             }
72             set {
73             }
74         }
75
76         byte IDbDataParameter.Scale { // SqlProjectTracking 17233
77             get {
78                 return 0;
79             }
80             set {
81             }
82         }
83
84         virtual public byte Precision {
85             get {
86                 return ((IDbDataParameter)this).Precision;
87             }
88             set {
89                 ((IDbDataParameter)this).Precision = value;
90             }
91         }
92
93         virtual public byte Scale {
94             get {
95                 return ((IDbDataParameter)this).Scale;
96             }
97             set {
98                 ((IDbDataParameter)this).Scale = value;
99             }
100         }
101
102         [
103         ResCategoryAttribute(Res.DataCategory_Data),
104         ResDescriptionAttribute(Res.DbParameter_Size),
105         ]
106         abstract public int Size {
107             get;
108             set;
109         }
110
111         [
112         DefaultValue(""),
113         ResCategoryAttribute(Res.DataCategory_Update),
114         ResDescriptionAttribute(Res.DbParameter_SourceColumn),
115         ]
116         abstract public String SourceColumn {
117             get;
118             set;
119         }
120
121         [
122         DefaultValue(false),
123         EditorBrowsableAttribute(EditorBrowsableState.Advanced),
124         RefreshProperties(RefreshProperties.All),
125         ResCategoryAttribute(Res.DataCategory_Update),
126         ResDescriptionAttribute(Res.DbParameter_SourceColumnNullMapping),
127         ]
128         abstract public bool SourceColumnNullMapping {
129             get;
130             set;
131         }
132
133         [
134         DefaultValue(DataRowVersion.Current),
135         ResCategoryAttribute(Res.DataCategory_Update),
136         ResDescriptionAttribute(Res.DbParameter_SourceVersion),
137         ]
138         virtual public DataRowVersion SourceVersion {
139             get { return DataRowVersion.Default; }
140             set { }
141         }
142
143         [
144         DefaultValue(null),
145         RefreshProperties(RefreshProperties.All),
146         ResCategoryAttribute(Res.DataCategory_Data),
147         ResDescriptionAttribute(Res.DbParameter_Value),
148         ]
149         abstract public object Value {
150             get;
151             set;
152         }
153     }
154 }
155