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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="InitializationEventAttribute.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. /*
  16. */
  17. namespace System.ComponentModel
  18. {
  19.    
  20.     using System;
  21.     using System.Security.Permissions;
  22.    
  23.     /// <devdoc>
  24.     /// <para>Specifies which event is fired on initialization.</para>
  25.     /// </devdoc>
  26.     [AttributeUsage(AttributeTargets.Class)]
  27.     public sealed class InitializationEventAttribute : Attribute
  28.     {
  29.        
  30.         private string eventName = null;
  31.        
  32.         /// <devdoc>
  33.         /// <para>
  34.         /// Initializes a new instance of the <see cref='System.ComponentModel.InitializationEventAttribute'/> class.
  35.         /// </para>
  36.         /// </devdoc>
  37.         public InitializationEventAttribute(string eventName)
  38.         {
  39.             this.eventName = eventName;
  40.         }
  41.        
  42.        
  43.         /// <devdoc>
  44.         /// <para>
  45.         /// Gets the name of the initialization event.
  46.         /// </para>
  47.         /// </devdoc>
  48.         public string EventName {
  49.             get { return this.eventName; }
  50.         }
  51.     }
  52. }

Developer Fusion