[Mono-list] Debug.Assert - a cross-platform issue

MarLOne InfoSeeker002 at gmail.com
Sat Nov 22 00:25:13 UTC 2014


Hello,

I have to thank Microsoft to open-source the .Net library allowing me to
read their code to get to the bottom of Microsoft's treatment (even I have
already asserted the value at runtime) of default values for the
System.Diagnostics.DefaultTraceListener. For those interested in reading
this can find it here:  DefaultTraceListener.cs
<https://github.com/Microsoft/referencesource/blob/9da503f9ef21e8d1f2905c78d4e3e5cbb3d6f85a/System/compmod/system/diagnostics/DefaultTraceListener.cs> 
. The default value of property that determines the reaction of Debug.Assert
is set here:  assertuienabled
<https://github.com/Microsoft/referencesource/blob/9da503f9ef21e8d1f2905c78d4e3e5cbb3d6f85a/System/compmod/system/diagnostics/AssertSection.cs> 
.

It is not true that Mono does not create an instance of DefaultTraceListener
on start up otherwise code like this:
DefaultTraceListener defListener = Debug.Listeners["Default"] as
DefaultTraceListener; 

will produce a null value for defListener.

It will be good if these classes and assemblies from Microsoft open-sources
are incorporated verbatim into Mono to replace its inconsistent code.

In this thread some one had pointed out to me that because I admitted
routinely disassembling Microsoft's assemblies, in accordance to Mono's 
contribution rule <http://www.mono-project.com/Contributing#Important_Rules> 
, I cannot contribute.

With Microsoft now open-sourcing their .Net library, what will happen to
this "contribution rule"?
 
MarL



--
View this message in context: http://mono.1490590.n4.nabble.com/Debug-Assert-a-cross-platform-issue-tp4662174p4664765.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list