Skip to content
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

(GH-10127) Document enums as function parameters #10135

Merged

Conversation

michaeltlombardi
Copy link
Contributor

@michaeltlombardi michaeltlombardi commented Jun 5, 2023

PR Summary

Prior to this change, the about_Enum topic showed using enumerations in scripts but not as parameters.

This change:

  • Adds a new section to the article, clarifying the benefits of using enumerations as parameter types and including an example.
  • Cleans up the prose and formatting for the article.
  • Documents using the HasFlag() method as an alternative to using the binary comparison operator.
  • Resolves Passing Enums as Function Parameters #10127
  • Fixes AB#97124

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the contributors guide.
  • Style: This PR adheres to the style guide.

Prior to this commit, the `about_Enum` topic showed using enumerations
in scripts but not as parameters.

This change:

- Adds a new section to the article, clarifying the benefits of using
  enumerations as parameter types and including an example.
- Resolves MicrosoftDocs#10127
- Fixes AB#97124
This change cleans up the formatting and prose for the `about_Enum` article.
It also documents using the `HasFlag()` method as an alternative to using the
binary comparison operator.
@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 84ed2ae:

✅ Validation status: passed

File Status Preview URL Details
reference/5.1/Microsoft.PowerShell.Core/About/about_Enum.md ✅Succeeded View (powershell-5.1)
reference/7.2/Microsoft.PowerShell.Core/About/about_Enum.md ✅Succeeded View (powershell-7.2)
reference/7.3/Microsoft.PowerShell.Core/About/about_Enum.md ✅Succeeded View (powershell-7.3)
reference/7.4/Microsoft.PowerShell.Core/About/about_Enum.md ✅Succeeded View (powershell-7.4)

For more details, please refer to the build report.

For any questions, please:

@michaeltlombardi michaeltlombardi changed the title Ab 97124/main/enum params (GH-10127) Document enums as function parameters Jun 5, 2023
@sdwheeler sdwheeler merged commit 7e7053e into MicrosoftDocs:main Jun 5, 2023
@michaeltlombardi michaeltlombardi deleted the ab-97124/main/enum-params branch September 13, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passing Enums as Function Parameters
2 participants