TestEncoding.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. // TestEncoding.cs
  3. //
  4. // Author:
  5. // Atsushi Enomoto <[email protected]>
  6. //
  7. // Copyright (C) 2005 Novell, Inc. http://www.novell.com
  8. //
  9. // Used for testing custom encoding.
  10. //
  11. #if NET_2_0
  12. using System;
  13. using System.IO;
  14. using System.Text;
  15. using NUnit.Framework;
  16. namespace MonoTests.System.Text
  17. {
  18. internal class MyEncoding : Encoding
  19. {
  20. public MyEncoding ()
  21. {
  22. }
  23. public MyEncoding (int codepage)
  24. : base (codepage)
  25. {
  26. }
  27. public override int GetByteCount (char [] chars, int index, int count)
  28. {
  29. return 0;
  30. }
  31. public override int GetBytes (char [] chars, int charIndex, int charCount, byte [] bytes, int byteIndex)
  32. {
  33. return 0;
  34. }
  35. public override int GetCharCount (byte [] bytes, int index, int count)
  36. {
  37. return 0;
  38. }
  39. public override int GetChars (byte [] bytes, int byteIndex, int byteCount, char [] chars, int charIndex)
  40. {
  41. return 0;
  42. }
  43. public override int GetMaxByteCount (int length)
  44. {
  45. return 0;
  46. }
  47. public override int GetMaxCharCount (int length)
  48. {
  49. return 0;
  50. }
  51. }
  52. }
  53. #endif