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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ComponentChangedEvent.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.ComponentChanged'/> 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 ComponentChangedEventArgs : EventArgs
  32.     {
  33.        
  34.         private object component;
  35.         private MemberDescriptor member;
  36.         private object oldValue;
  37.         private object newValue;
  38.        
  39.         /// <devdoc>
  40.         /// <para>
  41.         /// Gets or sets the component that is the cause of this event.
  42.         /// </para>
  43.         /// </devdoc>
  44.         public object Component {
  45.             get { return component; }
  46.         }
  47.        
  48.         /// <devdoc>
  49.         /// <para>
  50.         /// Gets or sets the member that is about to change.
  51.         /// </para>
  52.         /// </devdoc>
  53.         public MemberDescriptor Member {
  54.             get { return member; }
  55.         }
  56.        
  57.         /// <devdoc>
  58.         /// <para>
  59.         /// Gets or sets the new value of the changed member.
  60.         /// </para>
  61.         /// </devdoc>
  62.         public object NewValue {
  63.             get { return newValue; }
  64.         }
  65.        
  66.         /// <devdoc>
  67.         /// <para>
  68.         /// Gets or sets the old value of the changed member.
  69.         /// </para>
  70.         /// </devdoc>
  71.         public object OldValue {
  72.             get { return oldValue; }
  73.         }
  74.        
  75.         /// <devdoc>
  76.         /// <para>Initializes a new instance of the <see cref='System.ComponentModel.Design.ComponentChangedEventArgs'/> class.</para>
  77.         /// </devdoc>
  78.         public ComponentChangedEventArgs(object component, MemberDescriptor member, object oldValue, object newValue)
  79.         {
  80.             this.component = component;
  81.             this.member = member;
  82.             this.oldValue = oldValue;
  83.             this.newValue = newValue;
  84.         }
  85.     }
  86.    
  87. }

Developer Fusion