-
Notifications
You must be signed in to change notification settings - Fork 907
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
(#3539) Add design documentation for C# cmdlets #3601
base: feature/cmdlets
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think this looks good, just have a few clarifying questions, at least one I think requires changes.
|
||
### Output | ||
|
||
By default, `ChocolateyCmdlet`'s `WriteObject()` method will enumerate collections when outputting them, similar to how PowerShell's `Write-Output` works by default. If you need to disable this, use the `WriteObject ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line seems to end abruptly... I suspect there's more to be said here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good catch, thanks. Must have meant to look up what the overload is and didn't come back to it.
### Helpers | ||
|
||
`ChocolateyCmdlet` provides some helper methods for common operations that might be needed for many cmdlets. | ||
Some of these (and many more) are available on the `PSHelper` class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there more to this section we want to include in this section? Is the intention that the next section answers the questions about what kind of things might be here? Should that perhaps be mentioned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmm. I think most of that is answered in the next section.... the exact line for what goes onto ChocolateyCmdlet
itself is a little fuzzier and I don't have a fantastic way to delineate that really... In theory anything that takes PSCmdlet
as a parameter could be a helper method attached to ChocolateyCmdlet
, but in practice I think the useful set of things to have directly available is a good bit narrower given calling into PSHelper
is not really a big ask.
One other thing that's occurred to me: Should we consider linking to this from the higher up contributing document? I'm a little concerned about the discoverability of the document if it's just a file in a directory where you might not look for it as you're in Visual Studio... |
That's something I thought about and... am not really sure about. I suppose it can't hurt, I did have a bit of a difficult time trying to figure out a sensible place in the main CONTRIBUTING doc to reference it, but I can always add a new section... It also should probably be put into the sln file just to make it more visible in VS, I think. I'll do both. |
Given we use some slightly custom bits in Chocolatey.PowerShell that will alter how contributors are expected to work with the cmdlets in this project compared to how more bare-bones projects handle C# cmdlets, this document outlines some of the more notable changes as well as the common design practices we will be using here.
Description Of Changes
Motivation and Context
Given we use some slightly custom bits in Chocolatey.PowerShell that will alter how contributors are expected to work with the cmdlets in this project compared to how more bare-bones projects handle C# cmdlets, this document outlines some of the more notable changes as well as the common design practices we will be using here.
Testing
N/A, doc only.
Operating Systems Testing
N/A
Change Types Made
Change Checklist
Related Issue
Fixes #3539