Skip to content

CA1816 in NamedPipeClient.Dispose() #18338

Closed

Description

@xtqqczze

In PowerShell-CI-linux: https://dev.azure.com/powershell/PowerShell/_build/results?buildId=111689&view=logs&j=8579d1dd-da9d-5760-afc4-fb4c05cf5d6d&t=236f801b-8fac-50c5-f817-425a182daa54&l=6000

/home/vsts/work/1/s/test/tools/NamedPipeConnection/src/code/NamedPipeConnection.cs(61,13): warning CA1816: NamedPipeClient.Dispose() calls GC.SuppressFinalize(object), a method that is typically only called within an implementation of 'IDisposable.Dispose'. Refer to the IDisposable pattern for more information. [/home/vsts/work/1/s/test/tools/NamedPipeConnection/src/code/Microsoft.PowerShell.NamedPipeConnection.csproj::TargetFramework=net7.0]

cc: Paul Higinbotham (@PaulHigin)

Activity

  1. added
    Issue-Enhancementthe issue is more of a feature request than a bug
    Needs-TriageThe issue is new and needs to be triaged by a work group.
    on Oct 20, 2022
  2. xtqqczze commented on Oct 20, 2022

    @xtqqczze
    ContributorAuthor

    NamedPipeClient should implement IDisposable and it does not.

    Presumably this warning has been present since #17011.

  3. ghost added
    In-PRIndicates that a PR is out for the issue
    on Oct 20, 2022
  4. ghost removed
    In-PRIndicates that a PR is out for the issue
    on Oct 21, 2022
  5. ghost added
    In-PRIndicates that a PR is out for the issue
    on Oct 21, 2022
  6. 888zxcvb commented on Oct 23, 2022

    @888zxcvb

    open software

  7. ghost removed
    In-PRIndicates that a PR is out for the issue
    on Oct 24, 2022
  8. ghost removed
    Needs-TriageThe issue is new and needs to be triaged by a work group.
    on Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions