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

Add recognition for Dispose{} named function block #186

Closed
wants to merge 1 commit into from

Conversation

vexx32
Copy link

@vexx32 vexx32 commented Oct 12, 2019

Adds dispose{} named block keyword to language files. Yay, editor highlighting! 🎉

function Get-Foo {
    [CmdletBinding()]
    param()

    begin { }
    process { }
    end { }
    dispose { }
}

Reference PowerShell/PowerShell#9900 for indication on when the feature will become available. From current team decisions it appears it will likely be merged post-v7 and generally available the following release.

This is all the references to named blocks I could find, and I updated an example or two while I was at it. If I missed anything, please let me know.

/cc @TylerLeonhardt

Add dispose{} named block keyword to language files.
Yay, editor highlighting!
Copy link
Contributor

@msftrncs msftrncs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this is all it takes at this time.

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM awaiting merge in PowerShell repo

@andyleejordan
Copy link
Member

Thanks for this! Closing as the alternative clean block was implemented and merged instead of dispose.

@andyleejordan
Copy link
Member

Replaced by #208

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.

None yet

4 participants