Initial commit
[mono.git] / mcs / class / referencesource / System / compmod / system / componentmodel / DataErrorsChangedEventArgs.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="DataErrorsChangedEventArgs.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //------------------------------------------------------------------------------
6
7 namespace System.ComponentModel {
8
9     using System;
10     using System.Diagnostics;
11     using System.Security.Permissions;
12
13     /// <devdoc>
14     /// <para>Provides data for the <see langword='ErrorsChanged'/>
15     /// event.</para>
16     /// </devdoc>
17 #if !FEATURE_NETCORE
18     [HostProtection(SharedState = true)]
19 #endif
20     public class DataErrorsChangedEventArgs : EventArgs {
21         private readonly string propertyName;
22
23         /// <devdoc>
24         /// <para>Initializes a new instance of the <see cref='System.ComponentModel.DataErrorsChangedEventArgs'/>
25         /// class.</para>
26         /// </devdoc>
27         public DataErrorsChangedEventArgs(string propertyName) {
28             this.propertyName = propertyName;
29         }
30
31         /// <devdoc>
32         ///    <para>Indicates the name of the property whose errors changed.</para>
33         /// </devdoc>
34         public virtual string PropertyName {
35             get {
36                 return propertyName;
37             }
38         }
39     }
40 }