Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 5 additions & 5 deletions src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -857,13 +857,13 @@ public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, S
}
public enum PlatformID
{
Win32S = 0,
Win32Windows = 1,
[ComponentModel.EditorBrowsable(ComponentModel.EditorBrowsableState.Never)] Win32S = 0,
[ComponentModel.EditorBrowsable(ComponentModel.EditorBrowsableState.Never)] Win32Windows = 1,
Win32NT = 2,
WinCE = 3,
[ComponentModel.EditorBrowsable(ComponentModel.EditorBrowsableState.Never)] WinCE = 3,
Unix = 4,
Xbox = 5,
MacOSX = 6
[ComponentModel.EditorBrowsable(ComponentModel.EditorBrowsableState.Never)] Xbox = 5,
[ComponentModel.EditorBrowsable(ComponentModel.EditorBrowsableState.Never)] MacOSX = 6
}
public partial class Progress<T> : System.IProgress<T>
{
Expand Down
2 changes: 2 additions & 0 deletions src/System.Runtime.Extensions/src/System/Environment.Unix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ public static string MachineName
revision = FindAndParseNextNumber(release, ref i);
}

// For compatibility reasons with Mono, PlatformID.Unix is returned on MacOSX. PlatformID.MacOSX
// is hidden from the editor and shouldn't be used.
return new OperatingSystem(PlatformID.Unix, new Version(major, minor, build, revision));
});

Expand Down
12 changes: 7 additions & 5 deletions src/System.Runtime.Extensions/src/System/PlatformID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.ComponentModel;

namespace System
{
public enum PlatformID
{
Win32S = 0,
Win32Windows = 1,
[EditorBrowsable(EditorBrowsableState.Never)] Win32S = 0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is most important to have these annotations in the reference assembly src/System.Runtime.Extensions/ref/.... The editor looks for the attributes in the reference assembly.

Annotating implementation is fine too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

[EditorBrowsable(EditorBrowsableState.Never)] Win32Windows = 1,
Win32NT = 2,
WinCE = 3,
[EditorBrowsable(EditorBrowsableState.Never)] WinCE = 3,
Unix = 4,
Xbox = 5,
MacOSX = 6
[EditorBrowsable(EditorBrowsableState.Never)] Xbox = 5,
[EditorBrowsable(EditorBrowsableState.Never)] MacOSX = 6
}
}