Skip to content

Public SMA.Platform APIs #1230

Closed
Closed

Description

Before August, we should decide what APIs within the System.Management.Automation.Platform class (CorePsPlatform.cs) to expose publiclly, as the class itself needs to become public to unblock #1174. This will involve a refactor and clean-up of the class and the platform changes originally made during the port to Linux / OS X, which is intrinsically part of our diff review process.

Proposed public APIs:

  • IsLinux
  • IsOSX
  • IsWindows
  • IsCore
  • GetLocation(enum DataType) (a refactor of the XDG BDS selector)

Activity

  1. added
    Issue-Meta
    on Jun 28, 2016
  2. andyleejordan commented on Jun 28, 2016

    @andyleejordan
    MemberAuthor
  3. lzybkr commented on Jun 28, 2016

    @lzybkr
    Contributor

    I suggest s/IsLinux/IsUnix/ and s/IsCore/IsCoreClr/

    And XDG seems like it probably belongs in it's own class, not Platform.

  4. andyleejordan commented on Jun 28, 2016

    @andyleejordan
    MemberAuthor

    I suggest s/IsLinux/IsUnix/ and s/IsCore/IsCoreClr/

    Sounds just fine to me.

    And XDG seems like it probably belongs in it's own class, not Platform.

    XDG BDS is a Unix platform specific thing. However, we have two approaches:

    • IfUnix ( XDGSelector(type) ) else ( WindowsPath )
    • SelectFolder(type) and make this internally figure out Unix / Windows paths (this requires more work)

    Either way, it probably makes sense to have a class for location logic.

  5. andyleejordan commented on Jul 5, 2016

    @andyleejordan
    MemberAuthor

    I believe that #1280 is related to this.

  6. HemantMahawar commented on Jul 14, 2016

    @HemantMahawar
    Contributor

    Per today's discussion, agreed to revisit this for initial release

  7. andyleejordan commented on Jul 15, 2016

    @andyleejordan
    MemberAuthor

    I would actually not replace IsLinux with IsUnix considering there is an IsOSX, and UNIX implies (because of .NET Core) IsLinux || IsOSX.

  8. added and removed
    Issue-Meta
    on Jul 22, 2016
  9. andyleejordan commented on Jul 26, 2016

    @andyleejordan
    MemberAuthor

    APIs have been resolved. We're going out with the IsLinux, IsWindows, IsOSX, and IsCoreCLR, plus the GetLocation function. The "feature queries" have all been removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions