Commit Graph
306 Commits
Author SHA1 Message Date
Zoltan Varga 17edd267ab [bcl] Use List instead of ArrayList () in a few places. 2014-10-08 16:12:01 -04:00
Zoltan Varga c33600f57d [bcl] Free strings allocated using Marshal.SecureStringToBSTR () using Marshal.ZeroFreeBSTR (). 2014-10-08 15:12:35 -04:00
Alexander Köplinger d77664ceb0 [System] Add performanceCounters element to System.Diagnostics app.config configuration section
See http://msdn.microsoft.com/en-us/library/ms229387(v=vs.110).aspx for details about the element.
The value that is set by the element isn't currently used in Mono, but applications using it in their app.config crash otherwise (e.g. http://stackoverflow.com/questions/25741651).
2014-09-14 07:45:11 +02:00
Alexander Köplinger 29abf6790d [System] Fixed Diagnostics.Switch ctor behavior for null parameters
Passing null to the displayName or description ctor parameter on MS.NET makes them equal to an empty string.
Fixed the Mono behavior to match .NET.
2014-09-10 19:09:34 +02:00
Marius Ungureanu 462c6b08e9 [SourceSwitch] Refactor a piece of code. 2014-09-10 13:04:10 +03:00
ramtin 59be7ba9c5 The ShouldTrace conditions are fixed to correctly trace the events based on the Level 2014-09-09 11:50:06 -07:00
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Alexander Köplinger a8b2f07578 [Cleanup] Removed .jvm.cs files that are no longer used
They were once part of a special Java target profile, but this is no longer used today.
2014-08-07 23:01:51 +02:00
Rodrigo Kumpera 1531d4f34d [System] Throw IOE in more cases when dealing with an invalid Process object. Fixes #19864 2014-05-16 16:30:56 -04:00
Miguel de Icaza 3d04a49a2c System: Fix the previous bulid 2014-05-04 17:33:51 -04:00
Miguel de Icaza 705da187cf [System] Fix build warnings 2014-05-04 17:15:18 -04:00
Jonathan Pryor 199edbc851 [System] Add [MonoTODO] on DefaultTraceListener.AssertUiEnabled.
See the mono-list thread for fun/gory details:

http://lists.ximian.com/pipermail/mono-list/2014-March/050732.html
2014-04-03 11:54:25 -04:00
Piotr Zierhoffer e7dce0eeba Fix typo in exception message 2014-03-21 16:00:45 +01:00
Marek Safar 6352c16dd5 Merge pull request #963 from kebby/master
Fix Process.CancelErrorRead
2014-03-18 13:45:38 +01:00
Tammo 'kb' Hinrichs dce6eeaece Fix Process.CancelErrorRead
Fixed CancelErrorRead throwing an InvalidOperationException because it checked the wrong output stream (probably a cut&paste mistake).
2014-03-18 12:45:11 +01:00
Rodrigo Kumpera 4db7fe7112 [System] Fix process creation when UseShellExecute is set to false.
This fixes the behavior of process spawning when UseShellExecute is
set to true.

The right behavior is to return no process only when we used the system
launcher. So, spawning /bin/cat should behave in the same way independent
of how UseShellExecute is set.
2014-02-06 15:52:43 -05:00
Rodrigo Kumpera 5066972814 [System] When starting a process with UseShellExecute=true, don't return a process. Fixes #16119 2013-12-16 17:13:06 -05:00
Rodrigo Kumpera 09e65ba543 [bcl] When finalizing a Process object, don't touch the streams as they are finalized on their own. Fixes #10883. 2013-12-11 17:15:12 -05:00
Marek Safar 253b7cfc3f Set empty string to TraceListeners for empty assert message. Fixes #14505 2013-09-09 09:42:53 +02:00
Marek Safar 84d93ab24f Cleanup TraceImpl 2013-09-09 09:36:03 +02:00
Marek Safar 3dec818807 Don't print empty detailed assert message 2013-09-08 10:59:28 +02:00
Marek Safar ff876e0389 Fix TraceSource constructor. Fixes #12001 2013-05-09 14:52:36 +02:00
Jonathan Pryor 5543285e68 Add System.Diagnostics.Switch/etc. to the MOBILE profile.
Followup to:

	http://forums.xamarin.com/discussion/comment/11823/#Comment_11823

These are Switches with a labotomy: the MOBILE profile does not
support System.Configuration.dll, so there is no support for
.exe.config files or
System.Diagnostics.DiagnosticsConfigurationHandler.

Consequently these Switches are largely a compatibility/portability
aid: they DO NOT have the full functionality that the desktop
profile affords. Specifically, there is no way to provide an XML
config file that contains the Switch values to use. If you need to set
the Switch values, this MUST be done manually, e.g. through a Switch
constructor's `defaultSwitchValue` parameter or through a property,
e.g. for SourceSwitch:

	http://msdn.microsoft.com/en-us/library/w65awck1.aspx
	http://msdn.microsoft.com/en-us/library/system.diagnostics.sourceswitch.level.aspx
2013-04-29 14:38:53 -04:00
Jonathan Pryor f417a1f0cd Add System.Diagnostics.Trace to the MOBILE profile.
Requested here:

	http://forums.xamarin.com/discussion/3300/rationale-behind-removal-of-system-diagnostics-trace-in-xa-and-xi
2013-04-27 09:32:21 -04:00
Marek Safar 510f20d376 Fix failing mobile tests 2013-02-26 10:37:01 +01:00
Marek Safar 5aeeb9cf7b Fix few warnings 2013-02-25 19:10:09 +01:00
Rodrigo Kumpera 1b92a4148c Since MOBILE implies NET_4_* now, take this into account and simplify our ifdefs. 2013-02-11 18:42:18 -05:00
Sebastien Pouliot 52852db613 Use same name/casing for DllImport so we do not duplicate needlessly the extern entries in the metadata 2012-11-06 19:08:39 -05:00
Scott Blomquist ef6313d9c4 Return correctly-sized ProcessThreadCollection to enable Threads.Count. 2012-07-29 16:51:01 -07:00
Marek Safar d5d4b9c22b Fix some warnings 2012-06-08 12:48:08 +01:00
Miguel de Icaza f48ceb9860 [System] Removal of the NET_2_0 in the source code
Modulo the GUID in the assembly and the GUID embedded in some
field initializers that use the assembly GUID for their name, the
assemblies are idential before and after the patch.
2012-06-02 13:16:40 -04:00
Miguel de Icaza cad2cb445e Add these to MOBILE as well 2012-04-23 18:49:48 -04:00
Rolf Bjarne Kvinge 976279bba5 Add most of the Debug class (with related tracing types) to the mobile build. Fixes #3754. 2012-03-29 17:53:04 +02:00
Rodrigo Kumpera 83dccf8fe7 Add all missing sequential layout directives to corlib and system. 2011-12-13 11:57:23 -02:00
Zoltan Varga b0254ba0ef Throw a nicer error from Process.set_PriorityClass is the process has exited. Fixes #1692. 2011-11-04 18:54:10 +01:00
Atsushi Eno c860fd7dd4 Fix wrapper elements. It should be <TraceData><DataItem>... 2011-04-21 21:08:36 +09:00
Atsushi Eno 38050ff69b XmlWriterTraceListener supports XPathNavigator as non-escaped xml output. 2011-04-21 20:54:40 +09:00
Atsushi Eno 87a97563f6 Flush XmlWriter and TextWriter so that incomplete changes are not lost. 2011-04-15 14:56:11 +09:00
Atsushi Eno 9a69744701 Fix wrong TraceEventType values passed. 2011-04-13 02:21:02 +09:00
Louis Salin 16a5e11037 TraceData and TraceEvent methods must pass a new instance of TraceEventCache 2011-03-31 09:11:41 -04:00
Sebastien Pouliot 4eedff1487 Fix parameter name mismatches between Moonlight and Silverlight 2011-03-10 14:33:31 -05:00
Ankit Jain 77fabf1209 Process.Start: Show native error message in Win32Exception.
mcs/class/System/System.Diagnostics/Process.cs (Start_noshell):
If the process execution fails, then add the error message for
the native error code in the Win32Exception thrown.
2011-01-27 04:03:46 +05:30
Gonzalo Paniagua Javier 827a231ffc Remove arbitrary 1024 limit in GetProcesses
Reallocate the array of PIDs if EnumProcesses used all of it and try
	again.
2010-10-22 00:01:38 -04:00
Jonathan Pryor 9f264b8748 Don't load app.config when we're processing app.config
Fixes #605033.

'cause stack overflow is back, mkay?

  at System.Diagnostics.TraceImpl.InitOnce () <0x0005b>
  at System.Diagnostics.TraceImpl.get_IndentLevel () <0x0000b>
  at System.Diagnostics.TraceListenerCollection.InitializeListener (System.Diagnostics.TraceListener) <0x0000f>
  at System.Diagnostics.TraceListenerCollection.Add (System.Diagnostics.TraceListener) <0x00017>
  at System.Diagnostics.TraceListenerCollection..ctor (bool) <0x0007f>
  at System.Diagnostics.TraceListenerCollection..ctor () <0x00013>
  at System.Diagnostics.DiagnosticsConfigurationHandler.GetSharedListeners (System.Collections.IDictionary) <0x00083>
  at System.Diagnostics.DiagnosticsConfigurationHandler.Create (object,object,System.Xml.XmlNode) <0x003cf>
  at System.Configuration.ConfigurationSection.GetRuntimeObject () <0x0033d>
  at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (string) <0x00041>
  at System.Configuration.ConfigurationManager.GetSection (string) <0x00030>
  at System.Configuration.ConfigurationSettings.GetConfig (string) <0x0000f>
  at System.Diagnostics.DiagnosticsConfiguration.get_Settings () <0x00043>
  at System.Diagnostics.TraceImpl.InitOnce () <0x0005b>

Thus, when we're getting the <sharedListeners/> element, we shouldn't call
the TraceListenerCollection default constructor, as that will attempt to add
the DefaultTraceListener (which isn't needed anyway, as the
DefaultTraceListener is explicitly added by TraceImplSettings).
2010-10-18 16:57:53 -04:00
Miguel de Icaza 0085c16ada Revert 2010-09-15 17:18:18 -04:00
Miguel de Icaza acfdccca84 Make the thread-id field be of the proper size on 64 bit machines.
This error was found by Gonzalo when he was looking at another problem
when thread IDs overflowed ints.

Currently we use gpointers in the io-layer for the threadid, but we were
only exposing the value as an int32.   The good news is that the code is
not really used right now, but could cause problems in the future as we
extend Process.
2010-09-15 14:28:23 -04:00
Jb Evain 9cb87907d7 Enable the System build for monodroid 2010-09-08 18:48:28 +02:00
Raja R Harinath b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
Gonzalo Paniagua Javier e497bb1b59 2010-07-06 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: allow the exit callback to be used more than once. Fixes
	bug #614909.



svn path=/trunk/mcs/; revision=159980
2010-07-06 18:39:07 +00:00
Gonzalo Paniagua Javier 9b948ac91d 2010-07-04 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: ignore processes that finish while we are looking for
	processes by name. Fixes bug #596779.


svn path=/trunk/mcs/; revision=159866
2010-07-04 21:31:42 +00:00