1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 
5 namespace System.ComponentModel
6 {
7     /// <summary>
8     ///    <para>
9     ///       Provides data for the <see cref='System.ComponentModel.TypeDescriptor.Refresh'/> event.
10     ///    </para>
11     /// </summary>
12     public class RefreshEventArgs : EventArgs
13     {
14         /// <summary>
15         ///    <para>
16         ///       Initializes a new instance of the <see cref='System.ComponentModel.RefreshEventArgs'/> class with
17         ///       the component that has changed.
18         ///    </para>
19         /// </summary>
RefreshEventArgs(object componentChanged)20         public RefreshEventArgs(object componentChanged)
21         {
22             ComponentChanged = componentChanged;
23             TypeChanged = componentChanged.GetType();
24         }
25 
26         /// <summary>
27         ///    <para>
28         ///       Initializes a new instance of the <see cref='System.ComponentModel.RefreshEventArgs'/> class with
29         ///       the type of component that has changed.
30         ///    </para>
31         /// </summary>
RefreshEventArgs(Type typeChanged)32         public RefreshEventArgs(Type typeChanged)
33         {
34             TypeChanged = typeChanged;
35         }
36 
37         /// <summary>
38         ///    <para>
39         ///       Gets the component that has changed its properties, events, or extenders.
40         ///    </para>
41         /// </summary>
42         public object ComponentChanged { get; }
43 
44         /// <summary>
45         ///    <para>
46         ///       Gets the type that has changed its properties, or events.
47         ///    </para>
48         /// </summary>
49         public Type TypeChanged { get; }
50     }
51 }
52