You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the Inputs or Outputs section of the help content has no entries, I think it would be much cleaner to add a dummy node in the MAML so that it outputs, e.g. "-None-" or "None". While helpful to both sections, the situation is particularly egregious if the Outputs section is empty (because .NET does not put a header on the Examples section-aarrgh!), currently:
INPUTS
Data.VersionInfo
OUTPUTS
---------- EXAMPLE 1 ----------
So we could at least make it read a bit better:
INPUTS
Data.VersionInfo
OUTPUTS
-None-
---------- EXAMPLE 1 ----------
The text was updated successfully, but these errors were encountered:
This could be misleading if a cmdlet doesn't explicitly declare its output type, but it nonetheless does write objects to the pipeline. I think it aids adoption if a user can add XmlDoc2CmdletDoc to their project and it immediately generates useful help files, even without having written any specific XML Doc comments. This proposed change goes against that.
We could emit an output type of None if the output type is explicitly declared as void - i.e. [OutputType(typeof(void))] - but I'm not sure this is all that useful.
You present a good argument against my suggestion, Chris, so I am on board with skipping it. Furthermore, I actually do like your counter-proposal (explicitly declaring void to get "None") because that: (a) gives the user the choice whether to use the feature or not, and (b) promotes completeness in coding, if you will. By that I mean, that it should be a best practice to always specify an output type, otherwise, a reader could always have the question of whether the cmdlet actually has no output or the author simply forgot to specify it. (I have not done this before, but I think I will going forward.)
If the Inputs or Outputs section of the help content has no entries, I think it would be much cleaner to add a dummy node in the MAML so that it outputs, e.g. "-None-" or "None". While helpful to both sections, the situation is particularly egregious if the Outputs section is empty (because .NET does not put a header on the Examples section-aarrgh!), currently:
So we could at least make it read a bit better:
The text was updated successfully, but these errors were encountered: