TextInfo.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. //
  2. // System.Globalization.TextInfo.cs
  3. //
  4. // Author:
  5. // Dick Porter ([email protected])
  6. // Duncan Mak ([email protected])
  7. //
  8. // (C) 2002 Ximian, Inc.
  9. //
  10. using System.Globalization;
  11. using System.Runtime.Serialization;
  12. namespace System.Globalization {
  13. [Serializable]
  14. public class TextInfo: IDeserializationCallback
  15. {
  16. public TextInfo ()
  17. {
  18. }
  19. [MonoTODO]
  20. public virtual int ANSICodePage
  21. {
  22. get {
  23. return(0);
  24. }
  25. }
  26. [MonoTODO]
  27. public virtual int EBCDICCodePage
  28. {
  29. get {
  30. return(0);
  31. }
  32. }
  33. [MonoTODO]
  34. public virtual string ListSeparator
  35. {
  36. get {
  37. return(",");
  38. }
  39. }
  40. [MonoTODO]
  41. public virtual int MacCodePage
  42. {
  43. get {
  44. return(0);
  45. }
  46. }
  47. [MonoTODO]
  48. public virtual int OEMCodePage
  49. {
  50. get {
  51. return(0);
  52. }
  53. }
  54. [MonoTODO]
  55. public override bool Equals(object obj)
  56. {
  57. throw new NotImplementedException();
  58. }
  59. [MonoTODO]
  60. public override int GetHashCode()
  61. {
  62. throw new NotImplementedException();
  63. }
  64. [MonoTODO]
  65. public virtual char ToLower(char c)
  66. {
  67. return Char.ToLower (c);
  68. }
  69. [MonoTODO]
  70. public virtual string ToLower(string str)
  71. {
  72. if(str==null) {
  73. throw new ArgumentNullException("string is null");
  74. }
  75. Text.StringBuilder s = new Text.StringBuilder ();
  76. foreach (char c in str) {
  77. s.Append (Char.ToLower (c));
  78. }
  79. return s.ToString ();
  80. }
  81. [MonoTODO]
  82. public override string ToString()
  83. {
  84. return("TextInfo");
  85. }
  86. public string ToTitleCase (string str)
  87. {
  88. if(str == null)
  89. throw new ArgumentNullException("string is null");
  90. Text.StringBuilder s = new Text.StringBuilder ();
  91. s.Append (Char.ToUpper (str [0]));
  92. for (int i = 1; i < str.Length; i ++)
  93. s.Append (str [i]);
  94. return s.ToString ();
  95. }
  96. [MonoTODO]
  97. public virtual char ToUpper(char c)
  98. {
  99. return('X');
  100. }
  101. [MonoTODO]
  102. public virtual string ToUpper(string str)
  103. {
  104. if(str==null) {
  105. throw new ArgumentNullException("string is null");
  106. }
  107. return("");
  108. }
  109. /* IDeserialization interface */
  110. [MonoTODO]
  111. void IDeserializationCallback.OnDeserialization(object sender)
  112. {
  113. }
  114. }
  115. }