SerializationInfo.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. public sealed class SerializationInfo {
  13. Type type;
  14. IFormatterConverter converter;
  15. public SerializationInfo (Type type, IFormatterConverter converter)
  16. {
  17. this.type = type;
  18. this.converter = converter;
  19. }
  20. public string AssemblyName {
  21. get {
  22. return "TODO: IMPLEMENT ME";
  23. }
  24. set {
  25. }
  26. }
  27. public string FullTypeName {
  28. get {
  29. return "TODO: IMLEMENT ME";
  30. }
  31. set {
  32. }
  33. }
  34. public int MemberCount {
  35. get {
  36. return 0;
  37. }
  38. }
  39. //Public Instance Methods
  40. #region TODO: Implement these
  41. public void AddValue(string name, short value){}
  42. public void AddValue(string name, UInt16 value){}
  43. public void AddValue(string name, int value){}
  44. public void AddValue(string name, byte value){}
  45. public void AddValue(string name, bool value){}
  46. public void AddValue(string name, char value){}
  47. public void AddValue(string name, SByte value){}
  48. public void AddValue(string name, double value){}
  49. public void AddValue(string name, Decimal value){}
  50. public void AddValue(string name, DateTime value){}
  51. public void AddValue(string name, float value){}
  52. public void AddValue(string name, UInt32 value){}
  53. public void AddValue(string name, long value){}
  54. public void AddValue(string name, UInt64 value){}
  55. public void AddValue(string name, object value){}
  56. public void AddValue(string name, object value, Type type){}
  57. public bool GetBoolean(string name){return false;}
  58. public byte GetByte(string name){return 0;}
  59. public char GetChar(string name){return 'x';}
  60. public DateTime GetDateTime(string name){return new DateTime();}
  61. public Decimal GetDecimal(string name){return new Decimal();}
  62. public double GetDouble(string name){return 0;}
  63. public System.Runtime.Serialization.SerializationInfoEnumerator GetEnumerator(){return null;}
  64. public short GetInt16(string name){return 0;}
  65. public int GetInt32(string name){return 0;}
  66. public long GetInt64(string name){return 0;}
  67. public SByte GetSByte(string name){return new SByte();}
  68. public float GetSingle(string name){return 0;}
  69. public string GetString(string name){return "";}
  70. public UInt16 GetUInt16(string name){return 0;}
  71. public UInt32 GetUInt32(string name){return 0;}
  72. public UInt64 GetUInt64(string name){return 0;}
  73. public object GetValue(string name, Type type){return null;}
  74. public void SetType(Type type){}
  75. #endregion TODO
  76. }
  77. }