We need you! We're working hard on the next version of Developer Fusion - Let us know what you think we should be up to!

The Labs \ Source Viewer \ SSCLI \ System.Resources \ ResourceTypeCode

  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:  ResourceTypeCode
  18. **
  19. **
  20. ** Purpose: Marker for types in .resources files
  21. **
  22. **
  23. ===========================================================*/
  24. namespace System.Resources
  25. {
  26. /* An internal implementation detail for .resources files, describing
  27.       what type an object is. 
  28.       Ranges:
  29.       0 - 0x1F    Primitives and reserved values
  30.       0x20 - 0x3F  Specially recognized types, like byte[] and Streams
  31.       Note this data must be included in any documentation describing the
  32.       internals of .resources files.
  33.     */   
  34.     [Serializable()]
  35.     internal enum ResourceTypeCode
  36.     {
  37.         // Primitives
  38.         Null = 0,
  39.         String = 1,
  40.         Boolean = 2,
  41.         Char = 3,
  42.         Byte = 4,
  43.         SByte = 5,
  44.         Int16 = 6,
  45.         UInt16 = 7,
  46.         Int32 = 8,
  47.         UInt32 = 9,
  48.         Int64 = 10,
  49.         UInt64 = 11,
  50.         Single = 12,
  51.         Double = 13,
  52.         Decimal = 14,
  53.         DateTime = 15,
  54.         TimeSpan = 16,
  55.        
  56.         // A meta-value - change this if you add new primitives
  57.         LastPrimitive = TimeSpan,
  58.        
  59.         // Types with a special representation, like byte[] and Stream
  60.         ByteArray = 32,
  61.         Stream = 33,
  62.        
  63.         // User types - serialized using the binary formatter.
  64.         StartOfUserTypes = 64
  65.     }
  66. }

Developer Fusion