DBParameter.cs 4.2 KB

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