SerializationInfo.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. //
  2. // System.Runtime.Serialization.SerializationInfo.cs
  3. //
  4. // Author:
  5. // Miguel de Icaza ([email protected])
  6. //
  7. // (C) Ximian, Inc. http://www.ximian.com
  8. //
  9. // TODO: This is just a skeleton to get corlib to compile.
  10. //
  11. namespace System.Runtime.Serialization {
  12. [MonoTODO]
  13. public sealed class SerializationInfo {
  14. Type type;
  15. [CLSCompliant(false)] IFormatterConverter converter;
  16. [CLSCompliant(false)]
  17. public SerializationInfo (Type type, IFormatterConverter converter)
  18. {
  19. this.type = type;
  20. this.converter = converter;
  21. }
  22. [MonoTODO]
  23. public string AssemblyName {
  24. get {
  25. return type.Assembly.FullName;
  26. }
  27. set {
  28. }
  29. }
  30. public string FullTypeName {
  31. get {
  32. return type.FullName;
  33. }
  34. set {
  35. type = Type.GetType (value);
  36. }
  37. }
  38. public int MemberCount {
  39. get {
  40. return 0;
  41. }
  42. }
  43. //Public Instance Methods
  44. #region TODO: Implement these
  45. [CLSCompliant(false)][MonoTODO]
  46. public void AddValue(string name, short value){}
  47. [CLSCompliant(false)][MonoTODO]
  48. public void AddValue(string name, UInt16 value){}
  49. [MonoTODO]
  50. public void AddValue(string name, int value){}
  51. [MonoTODO]
  52. public void AddValue(string name, byte value){}
  53. [MonoTODO]
  54. public void AddValue(string name, bool value){}
  55. [MonoTODO]
  56. public void AddValue(string name, char value){}
  57. [CLSCompliant(false)][MonoTODO]
  58. public void AddValue(string name, SByte value){}
  59. [MonoTODO]
  60. public void AddValue(string name, double value){}
  61. [MonoTODO]
  62. public void AddValue(string name, Decimal value){}
  63. [MonoTODO]
  64. public void AddValue(string name, DateTime value){}
  65. [MonoTODO]
  66. public void AddValue(string name, float value){}
  67. [CLSCompliant(false)][MonoTODO]
  68. public void AddValue(string name, UInt32 value){}
  69. [MonoTODO]
  70. public void AddValue(string name, long value){}
  71. [CLSCompliant(false)][MonoTODO]
  72. public void AddValue(string name, UInt64 value){}
  73. [MonoTODO]
  74. public void AddValue(string name, object value){}
  75. [MonoTODO]
  76. public void AddValue(string name, object value, Type type){}
  77. [MonoTODO]
  78. public bool GetBoolean(string name){return false;}
  79. [MonoTODO]
  80. public byte GetByte(string name){return 0;}
  81. [MonoTODO]
  82. public char GetChar(string name){return 'x';}
  83. [MonoTODO]
  84. public DateTime GetDateTime(string name){return new DateTime();}
  85. [MonoTODO]
  86. public Decimal GetDecimal(string name){return new Decimal();}
  87. [MonoTODO]
  88. public double GetDouble(string name){return 0;}
  89. [MonoTODO]
  90. public System.Runtime.Serialization.SerializationInfoEnumerator GetEnumerator(){return null;}
  91. [MonoTODO]
  92. public short GetInt16(string name){return 0;}
  93. [MonoTODO]
  94. public int GetInt32(string name){return 0;}
  95. [MonoTODO]
  96. public long GetInt64(string name){return 0;}
  97. [CLSCompliant(false)][MonoTODO]
  98. public SByte GetSByte(string name){return new SByte();}
  99. [MonoTODO]
  100. public float GetSingle(string name){return 0;}
  101. [MonoTODO]
  102. public string GetString(string name){return "";}
  103. [CLSCompliant(false)][MonoTODO]
  104. public UInt16 GetUInt16(string name){return 0;}
  105. [CLSCompliant(false)][MonoTODO]
  106. public UInt32 GetUInt32(string name){return 0;}
  107. [CLSCompliant(false)][MonoTODO]
  108. public UInt64 GetUInt64(string name){return 0;}
  109. [MonoTODO]
  110. public object GetValue(string name, Type type){return null;}
  111. [MonoTODO]
  112. public void SetType(Type type){}
  113. #endregion TODO
  114. }
  115. }