NotSupportedStreamBase.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using Lua.IO;
  2. namespace Lua.Tests.Helpers
  3. {
  4. public class NotSupportedStreamBase : ILuaIOStream
  5. {
  6. public virtual void Dispose()
  7. {
  8. }
  9. public virtual ValueTask<string?> ReadLineAsync(CancellationToken cancellationToken)
  10. {
  11. throw IOThrowHelpers.GetNotSupportedException();
  12. }
  13. public virtual ValueTask<string> ReadToEndAsync(CancellationToken cancellationToken)
  14. {
  15. throw IOThrowHelpers.GetNotSupportedException();
  16. }
  17. public virtual ValueTask<string?> ReadStringAsync(int count, CancellationToken cancellationToken)
  18. {
  19. throw IOThrowHelpers.GetNotSupportedException();
  20. }
  21. public virtual ValueTask WriteAsync(ReadOnlyMemory<char> buffer, CancellationToken cancellationToken)
  22. {
  23. throw IOThrowHelpers.GetNotSupportedException();
  24. }
  25. public virtual ValueTask FlushAsync(CancellationToken cancellationToken)
  26. {
  27. throw IOThrowHelpers.GetNotSupportedException();
  28. }
  29. public virtual void SetVBuf(LuaFileBufferingMode mode, int size)
  30. {
  31. throw IOThrowHelpers.GetNotSupportedException();
  32. }
  33. public virtual long Seek(long offset, SeekOrigin origin)
  34. {
  35. throw IOThrowHelpers.GetNotSupportedException();
  36. }
  37. }
  38. }