DbParameterBase.cs 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. //
  2. // System.Data.ProviderBase.DbParameterBase
  3. //
  4. // Author:
  5. // Sureshkumar T ([email protected])
  6. // Tim Coleman ([email protected])
  7. //
  8. // Copyright (C) Tim Coleman, 2003
  9. //
  10. //
  11. // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
  12. //
  13. // Permission is hereby granted, free of charge, to any person obtaining
  14. // a copy of this software and associated documentation files (the
  15. // "Software"), to deal in the Software without restriction, including
  16. // without limitation the rights to use, copy, modify, merge, publish,
  17. // distribute, sublicense, and/or sell copies of the Software, and to
  18. // permit persons to whom the Software is furnished to do so, subject to
  19. // the following conditions:
  20. //
  21. // The above copyright notice and this permission notice shall be
  22. // included in all copies or substantial portions of the Software.
  23. //
  24. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  25. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  26. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  27. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  28. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  29. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  30. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  31. //
  32. #if NET_2_0
  33. using System.Data.Common;
  34. namespace System.Data.ProviderBase {
  35. public abstract class DbParameterBase : DbParameter
  36. {
  37. #region Fields
  38. string _name;
  39. ParameterDirection _direction = ParameterDirection.Input;
  40. bool _isNullable = false;
  41. int _size;
  42. byte _precision;
  43. byte _scale;
  44. object _paramValue;
  45. int _offset;
  46. DataRowVersion _sourceVersion;
  47. string _sourceColumn;
  48. #endregion // Fields
  49. #region Constructors
  50. [MonoTODO]
  51. protected DbParameterBase ()
  52. {
  53. }
  54. [MonoTODO]
  55. protected DbParameterBase (DbParameterBase source)
  56. {
  57. }
  58. #endregion // Constructors
  59. #region Properties
  60. [MonoTODO]
  61. protected object CoercedValue {
  62. get { throw new NotImplementedException (); }
  63. }
  64. public override ParameterDirection Direction {
  65. get { return _direction; }
  66. set { _direction = value; }
  67. }
  68. public override bool IsNullable {
  69. get { return _isNullable; }
  70. set { _isNullable = value; }
  71. }
  72. public override int Offset {
  73. get { return _offset; }
  74. set { _offset = value; }
  75. }
  76. public override string ParameterName {
  77. get { return _name; }
  78. set { _name = value; }
  79. }
  80. public override byte Precision {
  81. get { return _precision; }
  82. set { _precision = value; }
  83. }
  84. public override byte Scale {
  85. get { return _scale; }
  86. set { _scale = value; }
  87. }
  88. public override int Size {
  89. get { return _size; }
  90. set { _size = value; }
  91. }
  92. public override string SourceColumn {
  93. get { return _sourceColumn; }
  94. set { _sourceColumn = value; }
  95. }
  96. public override DataRowVersion SourceVersion {
  97. get { return _sourceVersion; }
  98. set { _sourceVersion = value; }
  99. }
  100. public override object Value {
  101. get { return _paramValue; }
  102. set { _paramValue = value; }
  103. }
  104. #endregion // Properties
  105. #region Methods
  106. [MonoTODO]
  107. public override void CopyTo (DbParameter destination)
  108. {
  109. throw new NotImplementedException ();
  110. }
  111. [MonoTODO]
  112. public virtual void PropertyChanging ()
  113. {
  114. throw new NotImplementedException ();
  115. }
  116. [MonoTODO]
  117. protected void ResetCoercedValue ()
  118. {
  119. throw new NotImplementedException ();
  120. }
  121. [MonoTODO]
  122. protected void ResetScale ()
  123. {
  124. throw new NotImplementedException ();
  125. }
  126. [MonoTODO]
  127. protected void SetCoercedValue ()
  128. {
  129. throw new NotImplementedException ();
  130. }
  131. [MonoTODO]
  132. protected bool ShouldSerializePrecision ()
  133. {
  134. throw new NotImplementedException ();
  135. }
  136. [MonoTODO]
  137. protected bool ShouldSerializeScale ()
  138. {
  139. throw new NotImplementedException ();
  140. }
  141. [MonoTODO]
  142. protected bool ShouldSerializeSize ()
  143. {
  144. throw new NotImplementedException ();
  145. }
  146. [MonoTODO]
  147. public override string ToString ()
  148. {
  149. throw new NotImplementedException ();
  150. }
  151. [MonoTODO]
  152. protected virtual byte ValuePrecision (object value)
  153. {
  154. throw new NotImplementedException ();
  155. }
  156. [MonoTODO]
  157. protected virtual byte ValueScale (object value)
  158. {
  159. throw new NotImplementedException ();
  160. }
  161. [MonoTODO]
  162. protected virtual int ValueSize (object value)
  163. {
  164. throw new NotImplementedException ();
  165. }
  166. #endregion // Methods
  167. }
  168. }
  169. #endif