Imported Upstream version 3.12.0

Former-commit-id: cf92446697332992ec36726e78eb8703e1f259d7
This commit is contained in:
Jo Shields
2015-01-13 10:44:36 +00:00
parent 8b9b85e7f5
commit 181b81b4a4
659 changed files with 12743 additions and 16300 deletions

View File

@ -39,7 +39,7 @@ using System.ComponentModel.Design;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Collections;
using System.Collections.Generic;
using System.Security;
using System.Threading;
@ -832,13 +832,13 @@ namespace System.Diagnostics {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern static int[] GetProcesses_internal();
public static Process[] GetProcesses()
public static Process[] GetProcesses ()
{
int [] pids = GetProcesses_internal ();
if (pids == null)
return new Process [0];
ArrayList proclist = new ArrayList (pids.Length);
var proclist = new List<Process> (pids.Length);
for (int i = 0; i < pids.Length; i++) {
try {
proclist.Add (GetProcessById (pids [i]));
@ -851,7 +851,7 @@ namespace System.Diagnostics {
}
}
return ((Process []) proclist.ToArray (typeof (Process)));
return proclist.ToArray ();
}
[MonoTODO ("There is no support for retrieving process information from a remote machine")]
@ -871,7 +871,7 @@ namespace System.Diagnostics {
if (pids == null)
return new Process [0];
ArrayList proclist = new ArrayList (pids.Length);
var proclist = new List<Process> (pids.Length);
for (int i = 0; i < pids.Length; i++) {
try {
Process p = GetProcessById (pids [i]);
@ -886,7 +886,7 @@ namespace System.Diagnostics {
}
}
return ((Process []) proclist.ToArray (typeof (Process)));
return proclist.ToArray ();
}
[MonoTODO]
@ -940,7 +940,7 @@ namespace System.Diagnostics {
ref proc_info);
} finally {
if (proc_info.Password != IntPtr.Zero)
Marshal.FreeBSTR (proc_info.Password);
Marshal.ZeroFreeBSTR (proc_info.Password);
proc_info.Password = IntPtr.Zero;
}
if (!ret) {
@ -1080,7 +1080,7 @@ namespace System.Diagnostics {
ref proc_info);
} finally {
if (proc_info.Password != IntPtr.Zero)
Marshal.FreeBSTR (proc_info.Password);
Marshal.ZeroFreeBSTR (proc_info.Password);
proc_info.Password = IntPtr.Zero;
}
if (!ret) {