[Mono-dev] DebuggingAttribute and ComVisibleAttribute
Leszek Ciesielski
skolima at gmail.com
Thu Oct 19 15:25:59 EDT 2006
Hi,
attached is a small patch which makes those two attributes compatible
with net 1.1 and net 2.0. Permission to commit?
Another thing: are such small incompatibilities intentional, or is
this just a mistake? Should I commit more of such 'API -
compatibility' fixes?
-------------- next part --------------
Index: System.Runtime.InteropServices/ComVisible.cs
===================================================================
--- System.Runtime.InteropServices/ComVisible.cs (wersja 66821)
+++ System.Runtime.InteropServices/ComVisible.cs (kopia robocza)
@@ -39,10 +39,13 @@
AttributeTargets.Method | AttributeTargets.Property |
AttributeTargets.Field | AttributeTargets.Interface |
AttributeTargets.Delegate, Inherited=false)]
+#if NET_2_0
+ [ComVisibleAttribute(true)]
+#endif
public sealed class ComVisibleAttribute : Attribute
{
private bool Visible = false;
- public ComVisibleAttribute(bool value) {Visible = value;}
+ public ComVisibleAttribute(bool visibility) {Visible = visibility;}
public bool Value { get {return Visible;} }
}
}
Index: System.Diagnostics/DebuggableAttribute.cs
===================================================================
--- System.Diagnostics/DebuggableAttribute.cs (wersja 66821)
+++ System.Diagnostics/DebuggableAttribute.cs (kopia robocza)
@@ -31,9 +31,16 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if NET_2_0
+using System.Runtime.InteropServices;
+#endif
+
namespace System.Diagnostics {
- [AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Module)]
+ [AttributeUsageAttribute(AttributeTargets.Assembly|AttributeTargets.Module, AllowMultiple=false)]
+#if NET_2_0
+ [ComVisibleAttribute(true)]
+#endif
public sealed class DebuggableAttribute : System.Attribute {
private bool JITTrackingEnabledFlag;
@@ -50,6 +57,8 @@
}
private DebuggingModes debuggingModes = DebuggingModes.None;
+
+ public DebuggingModes DebuggingFlags { get { return debuggingModes; } }
#endif
// Public Instance Constructors
More information about the Mono-devel-list
mailing list