The Labs \ Source Viewer \ SSCLI \ System.ComponentModel.Design \ ComponentEventArgs

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ComponentEvent.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.Design
  18. {
  19.     using Microsoft.Win32;
  20.     using System;
  21.     using System.ComponentModel;
  22.     using System.Diagnostics;
  23.     using System.Security.Permissions;
  24.    
  25.     /// <devdoc>
  26.     /// <para>Provides data for the System.ComponentModel.Design.IComponentChangeService.ComponentEvent
  27.     /// event raised for component-level events.</para>
  28.     /// </devdoc>
  29.     [HostProtection(SharedState = true)]
  30.     [System.Runtime.InteropServices.ComVisible(true)]
  31.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name = "FullTrust")]
  32.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")]
  33.     public class ComponentEventArgs : EventArgs
  34.     {
  35.        
  36.         private IComponent component;
  37.        
  38.         /// <devdoc>
  39.         /// <para>
  40.         /// Gets or sets the component associated with the event.
  41.         /// </para>
  42.         /// </devdoc>
  43.         public virtual IComponent Component {
  44.             get { return component; }
  45.         }
  46.        
  47.         /// <devdoc>
  48.         /// <para>
  49.         /// Initializes a new instance of the System.ComponentModel.Design.ComponentEventArgs class.
  50.         /// </para>
  51.         /// </devdoc>
  52.         public ComponentEventArgs(IComponent component)
  53.         {
  54.             this.component = component;
  55.         }
  56.     }
  57. }

Developer Fusion