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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="RefreshEventArgs.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.Diagnostics;
  22.     using System.Security.Permissions;
  23.    
  24.     /// <devdoc>
  25.     /// <para>
  26.     /// Provides data for the <see cref='System.ComponentModel.TypeDescriptor.Refresh'/> event.
  27.     /// </para>
  28.     /// </devdoc>
  29.     [HostProtection(SharedState = true)]
  30.     public class RefreshEventArgs : EventArgs
  31.     {
  32.        
  33.         private object componentChanged;
  34.         private Type typeChanged;
  35.        
  36.         /// <devdoc>
  37.         /// <para>
  38.         /// Initializes a new instance of the <see cref='System.ComponentModel.RefreshEventArgs'/> class with
  39.         /// the component that has
  40.         /// changed.
  41.         /// </para>
  42.         /// </devdoc>
  43.         public RefreshEventArgs(object componentChanged)
  44.         {
  45.             this.componentChanged = componentChanged;
  46.             this.typeChanged = componentChanged.GetType();
  47.         }
  48.        
  49.         /// <devdoc>
  50.         /// <para>
  51.         /// Initializes a new instance of the <see cref='System.ComponentModel.RefreshEventArgs'/> class with
  52.         /// the type
  53.         /// of component that has changed.
  54.         /// </para>
  55.         /// </devdoc>
  56.         public RefreshEventArgs(Type typeChanged)
  57.         {
  58.             this.typeChanged = typeChanged;
  59.         }
  60.        
  61.         /// <devdoc>
  62.         /// <para>
  63.         /// Gets the component that has changed
  64.         /// its properties, events, or
  65.         /// extenders.
  66.         /// </para>
  67.         /// </devdoc>
  68.         public object ComponentChanged {
  69.             get { return componentChanged; }
  70.         }
  71.        
  72.         /// <devdoc>
  73.         /// <para>
  74.         /// Gets the type that has changed its properties, or events.
  75.         /// </para>
  76.         /// </devdoc>
  77.         public Type TypeChanged {
  78.             get { return typeChanged; }
  79.         }
  80.     }
  81. }

Developer Fusion