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

ObsoleteAttribute.cs « System « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6215c9379fda8f51d45ab05b0ca806f33cbee009 (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
47
48
//
// System.ObsoleteAttribute.cs
//
// Author: Duncan Mak  (duncan@ximian.com)
//
// (C) Ximian, Inc.  http://www.ximian.com
//

namespace System
{
     [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct |
		      AttributeTargets.Enum | AttributeTargets.Constructor |
		      AttributeTargets.Method | AttributeTargets.Property |
		      AttributeTargets.Field | AttributeTargets.Event |
		      AttributeTargets.Interface | AttributeTargets.Delegate)]
	     [Serializable]
	     public sealed class ObsoleteAttribute : Attribute
	     {
		     private string message;
		     private bool isError = false;
		     
		     //	 Constructors
		     public ObsoleteAttribute ()
			     : base ()
		     {
		     }
		     
		     public ObsoleteAttribute (string message)
		     {
			     this.message = message;
		     }
		     
		     public ObsoleteAttribute (string message, bool error)
		     {
			     this.message = message;
			     this.isError = error;
		     }

		     // Properties
		     public string Message {
			     get { return message; }
		     }

		     public bool IsError {
			     get { return isError; }
		     }
	     }
}