Skip to content

Refactor code in CompletionCompletors.cs for creation of new CompletionContext #4037

@adityapatwardhan

Description

@adityapatwardhan

The code pattern is found about 18 times in https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs#L1328

return CompleteCommand(new CompletionContext { WordToComplete = ... }

This should be refactored into a method.

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
CLRVersion
GitCommitId                    v6.0.0-beta.2-40-g7096cdc836fd435436850c0adda20ed4236a53c4-dirty
OS                             Microsoft Windows 10.0.16204
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions