Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude the managed code around libproc on iOS/tvOS #61590

Merged
merged 3 commits into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -311,17 +311,24 @@
</ItemGroup>
<ItemGroup Condition=" '$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
<Compile Include="System\Diagnostics\Process.BSD.cs" />
<Compile Include="System\Diagnostics\Process.OSX.cs" />
<Compile Include="System\Diagnostics\ProcessManager.BSD.cs" />
<Compile Include="System\Diagnostics\ProcessManager.OSX.cs" />
<Compile Include="System\Diagnostics\ProcessThread.OSX.cs" />
<Compile Include="$(CommonPath)Interop\OSX\Interop.libproc.cs"
Link="Common\Interop\OSX\Interop.libproc.cs" />
<Compile Include="$(CommonPath)Interop\OSX\Interop.libproc.GetProcessInfoById.cs"
Link="Common\Interop\OSX\Interop.libproc.GetProcessInfoById.cs" />
<Compile Include="$(CommonPath)Interop\OSX\Interop.Libraries.cs"
Link="Common\Interop\OSX\Interop.Libraries.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsOSX)' == 'true'">
<Compile Include="$(CommonPath)Interop\OSX\Interop.libproc.cs"
Link="Common\Interop\OSX\Interop.libproc.cs" />
<Compile Include="System\Diagnostics\Process.OSX.cs" />
<Compile Include="System\Diagnostics\ProcessManager.OSX.cs" />
<Compile Include="System\Diagnostics\ProcessThread.OSX.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
<Compile Include="System\Diagnostics\Process.iOS.cs" />
<Compile Include="System\Diagnostics\ProcessManager.iOS.cs" />
<Compile Include="System\Diagnostics\ProcessThread.iOS.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="$(CommonPath)Interop\Windows\Shell32\Interop.ShellExecuteExW.cs"
Link="Common\Interop\Windows\Shell32\Interop.ShellExecuteExW.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections.Generic;
using System.ComponentModel;

namespace System.Diagnostics
{
public partial class Process
{
public TimeSpan PrivilegedProcessorTime => throw new PlatformNotSupportedException();
MaximLipnin marked this conversation as resolved.
Show resolved Hide resolved
public TimeSpan TotalProcessorTime => throw new PlatformNotSupportedException();
public TimeSpan UserProcessorTime => throw new PlatformNotSupportedException();
internal DateTime StartTimeCore => throw new PlatformNotSupportedException();
private int ParentProcessId => throw new PlatformNotSupportedException();
private string GetPathToOpenFile() => throw new PlatformNotSupportedException();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;

namespace System.Diagnostics
{
internal static partial class ProcessManager
{
public static int[] GetProcessIds()
{
throw new PlatformNotSupportedException();
}

private static ProcessInfo CreateProcessInfo(int pid)
{
throw new PlatformNotSupportedException();
}

private static string GetProcPath(int processId)
{
throw new PlatformNotSupportedException();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Diagnostics
{
public partial class ProcessThread
{
public TimeSpan PrivilegedProcessorTime => throw new PlatformNotSupportedException();
public TimeSpan TotalProcessorTime => throw new PlatformNotSupportedException();
public TimeSpan UserProcessorTime => throw new PlatformNotSupportedException();
private ThreadPriorityLevel PriorityLevelCore
{
get { throw new PlatformNotSupportedException(SR.ThreadPriorityNotSupported); }
set { throw new PlatformNotSupportedException(SR.ThreadPriorityNotSupported); }
}
private DateTime GetStartTime() => throw new PlatformNotSupportedException();
}
}