The Labs \ Source Viewer \ SSCLI \ System.Runtime.CompilerServices \ CompilationRelaxations

  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. namespace System.Runtime.CompilerServices
  18. {
  19.    
  20.     using System;
  21.    
  22.     /// IMPORTANT: Keep this in sync with corhdr.h
  23.     [Serializable(), Flags()]
  24.     [System.Runtime.InteropServices.ComVisible(true)]
  25.     public enum CompilationRelaxations : int
  26.     {
  27.         NoStringInterning = 8
  28.         // Start in 0x0008, we had other non public flags in this enum before,
  29.         // so we'll start here just in case somebody used them. This flag is only
  30.         // valid when set for Assemblies.
  31.     }
  32.    
  33.     [Serializable(), AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Method)]
  34.     [System.Runtime.InteropServices.ComVisible(true)]
  35.     public class CompilationRelaxationsAttribute : Attribute
  36.     {
  37.         private int m_relaxations;
  38.         // The relaxations.
  39.         public CompilationRelaxationsAttribute(int relaxations)
  40.         {
  41.             m_relaxations = relaxations;
  42.         }
  43.        
  44.         public CompilationRelaxationsAttribute(CompilationRelaxations relaxations)
  45.         {
  46.             m_relaxations = (int)relaxations;
  47.         }
  48.        
  49.         public int CompilationRelaxations {
  50.             get { return m_relaxations; }
  51.         }
  52.     }
  53.    
  54. }

Developer Fusion