Add a couple of attributes -miguel
authorMiguel de Icaza <miguel@gnome.org>
Sun, 19 Aug 2001 22:59:11 +0000 (22:59 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sun, 19 Aug 2001 22:59:11 +0000 (22:59 -0000)
svn path=/trunk/mcs/; revision=494

mcs/class/corlib/System/CLSCompliantAttribute.cs [new file with mode: 0755]
mcs/class/corlib/System/ContextStaticAttribute.cs [new file with mode: 0755]
mcs/class/corlib/System/FlagsAttribute.cs [new file with mode: 0755]
mcs/class/corlib/System/common.src

diff --git a/mcs/class/corlib/System/CLSCompliantAttribute.cs b/mcs/class/corlib/System/CLSCompliantAttribute.cs
new file mode 100755 (executable)
index 0000000..937ab2a
--- /dev/null
@@ -0,0 +1,33 @@
+//
+// System.CLSCompliantAttribute.cs
+//
+// Author:
+//   Miguel de Icaza (miguel@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+namespace System {
+
+       /// <summary>
+       ///   Used to indicate if an element of a program is CLS compliant.
+       /// </summary>
+       ///
+       /// <remarks>
+       /// </remarks>
+       public class CLSCompliant : Attribute {
+
+               bool is_compliant;
+
+               public CLSCompliant (bool is_compliant)
+               {
+                       this.is_compliant = is_compliant;
+               }
+
+               public bool IsCompliant {
+                       get {
+                               return is_compliant;
+                       }
+               }
+       }
+}
diff --git a/mcs/class/corlib/System/ContextStaticAttribute.cs b/mcs/class/corlib/System/ContextStaticAttribute.cs
new file mode 100755 (executable)
index 0000000..5cde02b
--- /dev/null
@@ -0,0 +1,24 @@
+//
+// System.ContextStatic.cs
+//
+// Author:
+//   Miguel de Icaza (miguel@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+namespace System {
+
+       /// <summary>
+       ///   The ContextStatic attribute is used to flag fields as being unique
+       /// </summary>
+       ///
+       /// <remarks>
+       ///   
+       /// </remarks>
+       public class ContextStatic : Attribute {
+
+               // No methods.
+               
+       }
+}
diff --git a/mcs/class/corlib/System/FlagsAttribute.cs b/mcs/class/corlib/System/FlagsAttribute.cs
new file mode 100755 (executable)
index 0000000..26e3525
--- /dev/null
@@ -0,0 +1,26 @@
+//
+// System.FlagsAttribute.cs
+//
+// Author:
+//   Miguel de Icaza (miguel@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+namespace System {
+
+       /// <summary>
+       ///   The FlagsAttribute tags enumerations as bitfields.
+       /// </summary>
+       ///
+       /// <remarks>
+       ///   The FlagsAttribute can be used to tag an enumeration to be 
+       ///   a bit field.  This will allow the compiler and visual tools
+       ///   to treat the bits in an enumeration as a set of flags.
+       /// </remarks>
+       public class FlagsAttribute : Attribute {
+
+               // No methods.
+               
+       }
+}
index bb9e5556e90d9174ae7ef88d211c042283353687..aa9e093e6e66e7f947c0b98c3d6b3ba38da97a61 100755 (executable)
@@ -10,7 +10,9 @@ AttributeTargets.cs
 Boolean.cs
 Byte.cs
 Char.cs
+CLSCompliantAttribute.cs
 Convert.cs
+ContextStaticAttribute.cs
 DivideByZeroException.cs
 Double.cs
 DuplicateWaitObjectException.cs
@@ -18,6 +20,7 @@ EventArgs.cs
 EventHandler.cs
 Exception.cs
 ExecutionEngineException.cs
+FlagsAttribute.cs
 FormatException.cs
 ICloneable.cs
 IComparable.cs