The Labs \ Source Viewer \ SSCLI \ System.ComponentModel \ CompModSwitches

  1. //------------------------------------------------------------------------------
  2. // <copyright file="CompModSwitches.cs" company="Microsoft">
  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. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.ComponentModel
  16. {
  17.     using System.Configuration.Assemblies;
  18.     using System.Diagnostics;
  19.     using System.Runtime.InteropServices;
  20.     using System.Runtime.Remoting;
  21.     using System.Runtime.Serialization.Formatters;
  22.     using System.Security.Permissions;
  23.     using System.Threading;
  24.    
  25.     /// <internalonly/>
  26.     [HostProtection(SharedState = true)]
  27.     static internal class CompModSwitches
  28.     {
  29.        
  30.         private static BooleanSwitch commonDesignerServices;
  31.         private static TraceSwitch eventLog;
  32.        
  33.         public static BooleanSwitch CommonDesignerServices {
  34.             get {
  35.                 if (commonDesignerServices == null) {
  36.                     commonDesignerServices = new BooleanSwitch("CommonDesignerServices", "Assert if any common designer service is not found.");
  37.                 }
  38.                 return commonDesignerServices;
  39.             }
  40.         }
  41.        
  42.         public static TraceSwitch EventLog {
  43.             get {
  44.                 if (eventLog == null) {
  45.                     eventLog = new TraceSwitch("EventLog", "Enable tracing for the EventLog component.");
  46.                 }
  47.                 return eventLog;
  48.             }
  49.         }
  50.        
  51.     }
  52. }

Developer Fusion