SchemaInfo.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. //
  2. // System.Data.Common.SchemaInfo.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. using System;
  10. namespace System.Data.Common {
  11. #if NET_1_2
  12. // FIXME: This needs to be cleaned up to be compatible with both versions.
  13. // Unfortunately, the SchemaInfo class we made is different from the MS
  14. // version which is now public.
  15. public class SchemaInfo
  16. #else
  17. internal class SchemaInfo
  18. #endif
  19. {
  20. #region Fields
  21. string columnName;
  22. string tableName;
  23. string dataTypeName;
  24. object value;
  25. bool allowDBNull;
  26. bool isReadOnly;
  27. int ordinal;
  28. int size;
  29. byte precision;
  30. byte scale;
  31. Type fieldType;
  32. #endregion // Fields
  33. #region Constructors
  34. public SchemaInfo ()
  35. {
  36. }
  37. #endregion // Constructors
  38. #region Properties
  39. public bool AllowDBNull {
  40. get { return allowDBNull; }
  41. set { allowDBNull = value; }
  42. }
  43. public string ColumnName {
  44. get { return columnName; }
  45. set { columnName = value; }
  46. }
  47. public int ColumnOrdinal {
  48. get { return ordinal; }
  49. set { ordinal = value; }
  50. }
  51. public int ColumnSize {
  52. get { return size; }
  53. set { size = value; }
  54. }
  55. public String DataTypeName {
  56. get { return dataTypeName; }
  57. set { dataTypeName = value; }
  58. }
  59. public Type FieldType {
  60. get { return fieldType; }
  61. set { fieldType = value; }
  62. }
  63. public byte NumericPrecision {
  64. get { return precision; }
  65. set { precision = value; }
  66. }
  67. public byte NumericScale {
  68. get { return scale; }
  69. set { scale = value; }
  70. }
  71. public string TableName {
  72. get { return tableName; }
  73. set { tableName = value; }
  74. }
  75. public bool IsReadOnly {
  76. get { return isReadOnly; }
  77. set { isReadOnly = value; }
  78. }
  79. #endregion // Properties
  80. }
  81. }