You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
2.9 KiB

4 years ago
  1. #if MYSQL_6_9
  2. // Copyright © 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  3. //
  4. // MySQL Connector/NET is licensed under the terms of the GPLv2
  5. // <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
  6. // MySQL Connectors. There are special exceptions to the terms and
  7. // conditions of the GPLv2 as it is applied to this software, see the
  8. // FLOSS License Exception
  9. // <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
  10. //
  11. // This program is free software; you can redistribute it and/or modify
  12. // it under the terms of the GNU General Public License as published
  13. // by the Free Software Foundation; version 2 of the License.
  14. //
  15. // This program is distributed in the hope that it will be useful, but
  16. // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  17. // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  18. // for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License along
  21. // with this program; if not, write to the Free Software Foundation, Inc.,
  22. // 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  23. using System;
  24. namespace Externals.MySql.Data.Types
  25. {
  26. [Serializable]
  27. internal partial struct MySqlDateTime : IConvertible
  28. {
  29. #region IConvertible Members
  30. ulong IConvertible.ToUInt64(IFormatProvider provider)
  31. {
  32. return 0;
  33. }
  34. sbyte IConvertible.ToSByte(IFormatProvider provider)
  35. {
  36. // TODO: Add MySqlDateTime.ToSByte implementation
  37. return 0;
  38. }
  39. double IConvertible.ToDouble(IFormatProvider provider)
  40. {
  41. return 0;
  42. }
  43. DateTime IConvertible.ToDateTime(IFormatProvider provider)
  44. {
  45. return GetDateTime();
  46. }
  47. float IConvertible.ToSingle(IFormatProvider provider)
  48. {
  49. return 0;
  50. }
  51. bool IConvertible.ToBoolean(IFormatProvider provider)
  52. {
  53. return false;
  54. }
  55. int IConvertible.ToInt32(IFormatProvider provider)
  56. {
  57. return 0;
  58. }
  59. ushort IConvertible.ToUInt16(IFormatProvider provider)
  60. {
  61. return 0;
  62. }
  63. short IConvertible.ToInt16(IFormatProvider provider)
  64. {
  65. return 0;
  66. }
  67. string System.IConvertible.ToString(IFormatProvider provider)
  68. {
  69. return null;
  70. }
  71. byte IConvertible.ToByte(IFormatProvider provider)
  72. {
  73. return 0;
  74. }
  75. char IConvertible.ToChar(IFormatProvider provider)
  76. {
  77. return '\0';
  78. }
  79. long IConvertible.ToInt64(IFormatProvider provider)
  80. {
  81. return 0;
  82. }
  83. System.TypeCode IConvertible.GetTypeCode()
  84. {
  85. return new System.TypeCode();
  86. }
  87. decimal IConvertible.ToDecimal(IFormatProvider provider)
  88. {
  89. return 0;
  90. }
  91. object IConvertible.ToType(Type conversionType, IFormatProvider provider)
  92. {
  93. return null;
  94. }
  95. uint IConvertible.ToUInt32(IFormatProvider provider)
  96. {
  97. return 0;
  98. }
  99. #endregion
  100. }
  101. }
  102. #endif