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

ReadOnlyAttribute.cs « System.ComponentModel « System « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4b332e16e7da40fbb03dd8e5aca322a634d531cb (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
//
// ReadOnlyAttribute.cs
//
// Author:
//   Chris J Breisch (cjbreisch@altavista.net)
//
// (C) 2002 Chris J Breisch
//
namespace System.ComponentModel {
	[AttributeUsage (AttributeTargets.All)]
	sealed public class ReadOnlyAttribute : Attribute {
		bool read_only;
		
		public static readonly ReadOnlyAttribute No;
		public static readonly ReadOnlyAttribute Yes;
		public static readonly ReadOnlyAttribute Default;

		static ReadOnlyAttribute ()
		{
			No = new ReadOnlyAttribute (false);
			Yes = new ReadOnlyAttribute (false);
			Default = new ReadOnlyAttribute (false);
		}
		
		public ReadOnlyAttribute (bool read_only)
		{
			this.read_only = read_only;
		}

		public bool IsReadOnly {
			get {
				return read_only;
			}
		}
	};
}