TestEncoding.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. using System;
  12. using System.IO;
  13. using System.Text;
  14. using NUnit.Framework;
  15. namespace MonoTests.System.Text
  16. {
  17. internal class MyEncoding : Encoding
  18. {
  19. public MyEncoding ()
  20. {
  21. }
  22. public MyEncoding (int codepage)
  23. : base (codepage)
  24. {
  25. }
  26. public override int GetByteCount (char [] chars, int index, int count)
  27. {
  28. return 0;
  29. }
  30. public override int GetBytes (char [] chars, int charIndex, int charCount, byte [] bytes, int byteIndex)
  31. {
  32. return 0;
  33. }
  34. public override int GetCharCount (byte [] bytes, int index, int count)
  35. {
  36. return 0;
  37. }
  38. public override int GetChars (byte [] bytes, int byteIndex, int byteCount, char [] chars, int charIndex)
  39. {
  40. return 0;
  41. }
  42. public override int GetMaxByteCount (int length)
  43. {
  44. return 0;
  45. }
  46. public override int GetMaxCharCount (int length)
  47. {
  48. return 0;
  49. }
  50. }
  51. }