Welcome to mirror list, hosted at ThFree Co, Russian Federation.

DescriptionAttribute.cs « System.ComponentModel « System « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 03e6f411d78582d7a5282e23fbe2e1b50dc7c8b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// System.ComponentModel.DescriptionAttribute.cs
//
// Author:
//   Miguel de Icaza (miguel@ximian.com)
//
// (C) Ximian, Inc.  http://www.ximian.com
//
//

namespace System.ComponentModel {

	[AttributeUsage (AttributeTargets.Property | AttributeTargets.Event)]
	public class DescriptionAttribute : Attribute {
		string desc;
			
		public DescriptionAttribute (string name)
		{
			desc = name;
		}

		public DescriptionAttribute ()
		{
			desc = "";
		}

		public virtual string Description {
			get {
				return DescriptionValue;
			}
		}

		//
		// Notice that the default Description implementation uses this by default
		//
		protected string DescriptionValue {
			get {
				return desc;
			}

			set {
				desc = value;
			}
		}
	}
}