The Labs \ Source Viewer \ SSCLI \ System.Runtime.Serialization \ IFormatterConverter

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. /*============================================================
  16. **
  17. ** Class: IFormatterConverter
  18. **
  19. **
  20. ** Purpose: The interface provides the connection between an
  21. ** instance of SerializationInfo and the formatter-provided
  22. ** class which knows how to parse the data inside the
  23. ** SerializationInfo.
  24. **
  25. **
  26. ============================================================*/
  27. namespace System.Runtime.Serialization
  28. {
  29.     using System;
  30.    
  31.     [CLSCompliant(false)]
  32.     [System.Runtime.InteropServices.ComVisible(true)]
  33.     public interface IFormatterConverter
  34.     {
  35.         object Convert(object value, Type type);
  36.         object Convert(object value, TypeCode typeCode);
  37.         bool ToBoolean(object value);
  38.         char ToChar(object value);
  39.         sbyte ToSByte(object value);
  40.         byte ToByte(object value);
  41.         short ToInt16(object value);
  42.         ushort ToUInt16(object value);
  43.         int ToInt32(object value);
  44.         uint ToUInt32(object value);
  45.         long ToInt64(object value);
  46.         ulong ToUInt64(object value);
  47.         float ToSingle(object value);
  48.         double ToDouble(object value);
  49.         decimal ToDecimal(object value);
  50.         DateTime ToDateTime(object value);
  51.         string ToString(object value);
  52.     }
  53. }

Developer Fusion