deprecated Assertion class. Code formatting. On 2.0 profile, allow
non-integral values for switches.
* BooleanSwitch.cs: Use base ctor for default value.
* Switch.cs: On 2.0 profile, store default value and use it if no
value is set in config file.
* SourceSwitch.cs: Use null to signal that there's no default value.
svn path=/trunk/mcs/; revision=86220
/system.diagnostics/switch/add/@value attribute only contain numeric data and
some other fixes (thread-safety in the Debug- and Trace-related classes).
* System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
(DiagnosticsConfiguration): Don't read the .config file from the
static ctor (again), as if it fails we'll get a TypeLoadException -- bad! Instead, lazy-read the .config file.
* System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
(DiagnosticsConfigurationHandler): Require that the /switch/add/@value
attribute contains only numeric values.
* System/System.Diagnostics/DiagnosticsConfigurationHandler.cs:
* System/System.Diagnostics/TraceImpl.cs: Don't initialize everything in
the static ctor, as if it fails (due to an invalid .confg file) we get a
TypeLoadException, while .NET generates a ConfigurationException.
Instead, initialize everything the first time the Listeners property is
accessed, which allows the static ctor to run without chance of failure,
avoiding the TypeLoadException.
* System/System.Diagnostics/TraceListenerCollection.cs: This should be
thread-safe, as it's accessible from a static member of TraceImpl
(available through the public Debug and Trace classes).
* System/System.Diagnostics/Switch.cs: Leave the original switch value alone.
If it isn't valid (i.e. numeric), the DiagnosticsConfigurationHandler
will catch it.
* System/Test/test-config-file: Remove "string-value" switch, as it causes
ConfigurationExceptions under .NET 1.1 (the value attribute can't be
non-numeric), and Mono now follows this behavior. Add a "custom-switch"
value, which is used in the regression tests.
* System/Test/System.Diagnostics/DiagnosticsConfigurationHandlerTest.cs:
.NET 1.1 requires that the value attribute be a numeric value; check for
that and update the success test so that they'll actually pass.
* System/Test/System.Diagnostics/SwitchesTest.cs: TestNewSwitch reads
"custom-switch" now, and the switches value is now "42", not "0".
Remove warning about unused variable.
svn path=/trunk/mcs/; revision=39090
configuration element /switches/add/@value attribute is now *required*, not
optional (as it was under .NET 1.0).
* System/System.Diagnostics/DiagnosticsConfigurationHandler.cs:
The /switch/add/@value attribute isn't optional under .NET 1.1, so make
sure it exists.
* System/Test/test-config-file: Remove <add/> elements lacking a value
attribute. .NET 1.1 doesn't support this anymore, and neither does Mono.
* System/Test/System.Diagnostics/DiagnosticsConfigurationHandlerTest.cs:
.NET 1.1 doesn't permit <add/> elements without a value attribute.
Assert the same under Mono.
svn path=/trunk/mcs/; revision=39046
them as [Category ("NotDotNet")]; Fix the TraceTag_Listeners example (it
was passing invalid XML in a "valid" test).
svn path=/trunk/mcs/; revision=39042
* DiagnosticsConfigurationHandlerTest.cs: Inherit from Assertion to
make it a bit simpler.
* SwitchesTest.cs: Make the tests pass on .NET 1.1
svn path=/trunk/mcs/; revision=21551
failures anymore. Added SwitchesTest (to test switches) and
DiagnosticsConfigurationHandler to test .config file handling.
Issues: while the DiagnosticsConfigurationHandlerTest is reasonably
self-contained, SwitchesTest is not. To properly test switches, we need a
.exe and a .exe.config file. The needed .exe.config file that SwitchesTest
depends on is present in `test-config-file', but I'm unsure where to place it
(much less what to name it).
Additionally, SwitchesTest generates test failures at this time, principally
because of the lack of .config file support in the test system.
Finally, makefile.gnu & system_linux_test.args was changed to use the newly
added tests and to reference System.Xml.dll, which is used by
DiagnosticsConfigurationHandlerTest.
svn path=/trunk/mcs/; revision=9807