Skip to content

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.

4 participants