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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ComponentChangingEvent.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 <see cref='System.ComponentModel.Design.IComponentChangeService.ComponentChanging'/> event.</para>
  27.     /// </devdoc>
  28.     [HostProtection(SharedState = true)]
  29.     [System.Runtime.InteropServices.ComVisible(true)]
  30.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")]
  31.     public sealed class ComponentChangingEventArgs : EventArgs
  32.     {
  33.        
  34.         private object component;
  35.         private MemberDescriptor member;
  36.        
  37.         /// <devdoc>
  38.         /// <para>
  39.         /// Gets or sets the component that is being changed or that is the parent container of the member being changed.
  40.         /// </para>
  41.         /// </devdoc>
  42.         public object Component {
  43.             get { return component; }
  44.         }
  45.        
  46.         /// <devdoc>
  47.         /// <para>
  48.         /// Gets or sets the member of the component that is about to be changed.
  49.         /// </para>
  50.         /// </devdoc>
  51.         public MemberDescriptor Member {
  52.             get { return member; }
  53.         }
  54.        
  55.         /// <devdoc>
  56.         /// <para>
  57.         /// Initializes a new instance of the <see cref='System.ComponentModel.Design.ComponentChangingEventArgs'/> class.
  58.         /// </para>
  59.         /// </devdoc>
  60.         public ComponentChangingEventArgs(object component, MemberDescriptor member)
  61.         {
  62.             this.component = component;
  63.             this.member = member;
  64.         }
  65.     }
  66. }

Developer Fusion