The Labs \ Source Viewer \ SSCLI \ System \ LoaderOptimizationAttribute

  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. ** File: AppDomainAttributes
  18. **
  19. **
  20. ** Purpose: For AppDomain-related custom attributes.
  21. **
  22. **
  23. =============================================================================*/
  24. namespace System
  25. {
  26.    
  27.     [Serializable()]
  28.     [System.Runtime.InteropServices.ComVisible(true)]
  29.     public enum LoaderOptimization
  30.     {
  31.         NotSpecified = 0,
  32.         SingleDomain = 1,
  33.         MultiDomain = 2,
  34.         MultiDomainHost = 3,
  35.        
  36.         [Obsolete("This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202")]
  37.         DomainMask = 3,
  38.        
  39.         [Obsolete("This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202")]
  40.         DisallowBindings = 4
  41.     }
  42.    
  43.     [AttributeUsage(AttributeTargets.Method)]
  44.     [System.Runtime.InteropServices.ComVisible(true)]
  45.     public sealed class LoaderOptimizationAttribute : Attribute
  46.     {
  47.         internal byte _val;
  48.        
  49.         public LoaderOptimizationAttribute(byte value)
  50.         {
  51.             _val = value;
  52.         }
  53.         public LoaderOptimizationAttribute(LoaderOptimization value)
  54.         {
  55.             _val = (byte)value;
  56.         }
  57.         public LoaderOptimization Value {
  58.             get { return (LoaderOptimization)_val; }
  59.         }
  60.     }
  61. }

Developer Fusion