OracleBFile.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. //
  2. // OracleBFile.cs
  3. //
  4. // Part of the Mono class libraries at
  5. // mcs/class/System.Data.OracleClient/System.Data.OracleClient
  6. //
  7. // Assembly: System.Data.OracleClient.dll
  8. // Namespace: System.Data.OracleClient
  9. //
  10. // Author: Tim Coleman <[email protected]>
  11. //
  12. // Copyright (C) Tim Coleman, 2003
  13. //
  14. // Licensed under the MIT/X11 License.
  15. //
  16. using System;
  17. using System.IO;
  18. using System.Data.SqlTypes;
  19. namespace System.Data.OracleClient {
  20. public sealed class OracleBFile : Stream, ICloneable, INullable {
  21. #region Fields
  22. public static readonly new OracleBFile Null = new OracleBFile ();
  23. OracleConnection connection;
  24. bool isOpen = true;
  25. bool notNull = false;
  26. #endregion // Fields
  27. #region Constructors
  28. internal OracleBFile () {
  29. }
  30. #endregion // Constructors
  31. #region Properties
  32. public override bool CanRead {
  33. get { return (IsNull || isOpen); }
  34. }
  35. public override bool CanSeek {
  36. get { return (IsNull || isOpen); }
  37. }
  38. public override bool CanWrite {
  39. get { return false; }
  40. }
  41. public OracleConnection Connection {
  42. get { return connection; }
  43. }
  44. public string DirectoryName {
  45. [MonoTODO]
  46. get {
  47. if (!isOpen)
  48. throw new ObjectDisposedException ("OracleBFile");
  49. throw new NotImplementedException ();
  50. }
  51. }
  52. public bool FileExists {
  53. [MonoTODO]
  54. get {
  55. if (!isOpen)
  56. throw new ObjectDisposedException ("OracleBFile");
  57. if (Connection.State == ConnectionState.Closed)
  58. throw new InvalidOperationException ();
  59. throw new NotImplementedException ();
  60. }
  61. }
  62. public string FileName {
  63. [MonoTODO]
  64. get {
  65. if (!isOpen)
  66. throw new ObjectDisposedException ("OracleBFile");
  67. if (IsNull)
  68. return String.Empty;
  69. throw new NotImplementedException ();
  70. }
  71. }
  72. public bool IsNull {
  73. get { return !notNull; }
  74. }
  75. public override long Length {
  76. [MonoTODO]
  77. get {
  78. if (!isOpen)
  79. throw new ObjectDisposedException ("OracleBFile");
  80. throw new NotImplementedException ();
  81. }
  82. }
  83. public override long Position {
  84. [MonoTODO]
  85. get {
  86. if (!isOpen)
  87. throw new ObjectDisposedException ("OracleBFile");
  88. throw new NotImplementedException ();
  89. }
  90. [MonoTODO]
  91. set {
  92. if (!isOpen)
  93. throw new ObjectDisposedException ("OracleBFile");
  94. if (value > Length)
  95. throw new ArgumentOutOfRangeException ();
  96. throw new NotImplementedException ();
  97. }
  98. }
  99. public object Value {
  100. [MonoTODO]
  101. get {
  102. throw new NotImplementedException ();
  103. }
  104. }
  105. #endregion // Properties
  106. #region Methods
  107. [MonoTODO]
  108. public object Clone () {
  109. throw new NotImplementedException ();
  110. }
  111. [MonoTODO]
  112. public long CopyTo (OracleLob destination) {
  113. throw new NotImplementedException ();
  114. }
  115. [MonoTODO]
  116. public long CopyTo (OracleLob destination, long destinationOffset) {
  117. throw new NotImplementedException ();
  118. }
  119. [MonoTODO]
  120. public long CopyTo (long sourceOffset, OracleLob destination, long destinationOffset, long amount) {
  121. throw new NotImplementedException ();
  122. }
  123. [MonoTODO]
  124. public void Dispose () {
  125. throw new NotImplementedException ();
  126. }
  127. [MonoTODO]
  128. public override void Flush () {
  129. throw new NotImplementedException ();
  130. }
  131. [MonoTODO]
  132. public override int Read (byte[] buffer, int offset, int count) {
  133. throw new NotImplementedException ();
  134. }
  135. [MonoTODO]
  136. public override long Seek (long offset, SeekOrigin origin) {
  137. throw new NotImplementedException ();
  138. }
  139. [MonoTODO]
  140. public void SetFileName (string directory, string file) {
  141. throw new NotImplementedException ();
  142. }
  143. [MonoTODO]
  144. public override void SetLength (long value) {
  145. throw new InvalidOperationException ();
  146. }
  147. [MonoTODO]
  148. public override void Write (byte[] buffer, int offset, int count) {
  149. throw new NotSupportedException ();
  150. }
  151. #endregion // Methods
  152. }
  153. }