2003-07-27 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
authorAndreas N <andreas@mono-cvs.ximian.com>
Sun, 27 Jul 2003 09:57:39 +0000 (09:57 -0000)
committerAndreas N <andreas@mono-cvs.ximian.com>
Sun, 27 Jul 2003 09:57:39 +0000 (09:57 -0000)
* SRDescriptionAttribute.cs: Moved from System.Diagnostics directory

svn path=/trunk/mcs/; revision=16733

mcs/class/System/System/ChangeLog
mcs/class/System/System/SRDescriptionAttribute.cs [new file with mode: 0644]

index 4534012dd980875e6775d73577f8d61ffdab87c5..ac27b88169d19f337d6d7b3449e180590bf77f34 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-27  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
+
+       * SRDescriptionAttribute.cs: Moved from System.Diagnostics directory
+
 2003-07-18  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
 
        * Uri.cs: Added MonoTODO'd members, implemented member, fixed signature
diff --git a/mcs/class/System/System/SRDescriptionAttribute.cs b/mcs/class/System/System/SRDescriptionAttribute.cs
new file mode 100644 (file)
index 0000000..24559c9
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// System.Diagnostics.SRDescriptionAttribute.cs
+//
+// Authors:
+//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
+//
+// (C) 2003 Andreas Nahr
+//
+
+using System;
+using System.ComponentModel;
+
+namespace System
+{
+       [AttributeUsage(AttributeTargets.All)]
+       internal class SRDescriptionAttribute : DescriptionAttribute
+       {
+               private bool isReplaced = false;
+
+               public SRDescriptionAttribute (string description)
+                       : base (description)
+               {
+               }
+
+               public override string Description {
+                       get {
+                               if (!isReplaced) {
+                                       isReplaced = true;
+                                       DescriptionValue = Locale.GetText (DescriptionValue);
+                               }
+                               return DescriptionValue;
+                       }
+               }
+       }
+}