Fri Feb 12 19:09:44 CET 2010 Paolo Molaro <lupus@ximian.com>
authorPaolo Molaro <lupus@oddwiz.org>
Fri, 12 Feb 2010 18:12:12 +0000 (18:12 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Fri, 12 Feb 2010 18:12:12 +0000 (18:12 -0000)
* TargetedPatchingOptOutAttribute.cs: new attribute in 4.0.

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

mcs/class/corlib/System.Runtime/ChangeLog
mcs/class/corlib/System.Runtime/TargetedPatchingOptOutAttribute.cs [new file with mode: 0644]
mcs/class/corlib/corlib.dll.sources

index 8bad1b50d9d8203c69dea80f3c3d70a066900d18..cab27d71839764f950cbcc54a5de7c8e8276b596 100644 (file)
@@ -1,3 +1,8 @@
+
+Fri Feb 12 19:09:44 CET 2010 Paolo Molaro <lupus@ximian.com>
+
+       * TargetedPatchingOptOutAttribute.cs: new attribute in 4.0.
+
 2010-02-12  Marek Habersack  <mhabersack@novell.com>
 
        * AssemblyTargetedPatchBandAttribute.cs: added
diff --git a/mcs/class/corlib/System.Runtime/TargetedPatchingOptOutAttribute.cs b/mcs/class/corlib/System.Runtime/TargetedPatchingOptOutAttribute.cs
new file mode 100644 (file)
index 0000000..721e6a6
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// System.Runtime.TargetedPatchingOptOutAttribute
+//
+// Author: Paolo Molaro (lupus@ximian.com)
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+
+using System;
+using System.Runtime.InteropServices;
+
+#if NET_4_0
+
+namespace System.Runtime.CompilerServices {
+
+       [AttributeUsage (AttributeTargets.Constructor|AttributeTargets.Method, AllowMultiple=false, Inherited = false)] 
+       public sealed class TargetedPatchingOptOutAttribute : Attribute
+       {
+               string reason;
+
+               public TargetedPatchingOptOutAttribute () : this ("") {
+               }
+
+               public TargetedPatchingOptOutAttribute (string reason)
+               {
+                       if (reason == null)
+                               throw new ArgumentNullException ("reason");
+                       this.reason = reason;
+               }
+
+               public string Reason
+               {
+                       get {
+                               return reason;
+                       }
+               }
+
+       }
+}
+
+#endif
+
index 5e7ce9b76d20d0a542dc3d4e05c0c71219f0cf58..b358c3265446d5f4337bc1ab1ca65b9925d0baf7 100644 (file)
@@ -582,6 +582,7 @@ System.Runtime/AssemblyTargetedPatchBandAttribute.cs
 System.Runtime/GCLatencyMode.cs
 System.Runtime/GCSettings.cs
 System.Runtime/MemoryFailPoint.cs
+System.Runtime/TargetedPatchingOptOutAttribute.cs
 System.Runtime.CompilerServices/AccessedThroughPropertyAttribute.cs
 System.Runtime.CompilerServices/ReferenceAssemblyAttribute.cs
 System.Runtime.CompilerServices/CallConvCdecl.cs