GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add recognition for Dispose{} named function block by vexx32 · Pull Request #186 · PowerShell/EditorSyntax

Conversation

@vexx32

@vexx32 Rain Sallow (/u/ta11ow) (vexx32) commented Oct 12, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TylerLeonhardt reacted with thumbs up emoji TylerLeonhardt reacted with hooray emoji TylerLeonhardt reacted with rocket emoji
All reactions
  • 👍 1 reaction
  • 🎉 1 reaction
  • 🚀 1 reaction
@vexx32
✨ Add recognition for Dispose{}
757f3fe
Add dispose{} named block keyword to language files.
Yay, editor highlighting!
@vexx32 Rain Sallow (/u/ta11ow) (vexx32) mentioned this pull request Oct 12, 2019
Implement Cleanup { } Function Block PowerShell/PowerShell#9900
Closed
6 of 13 tasks
msftrncs
Carl Morris (msftrncs) reviewed Oct 13, 2019
View reviewed changes

@msftrncs Carl Morris (msftrncs) left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM, this is all it takes at this time.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
TylerLeonhardt
TylerLeonhardt approved these changes Oct 14, 2019
View reviewed changes

@TylerLeonhardt TylerLeonhardt left a comment

Copy link
Copy Markdown
Member

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.

LGTM awaiting merge in PowerShell repo

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vexx32 reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@daxian-dbw Dongbo Wang (daxian-dbw) mentioned this pull request Jul 16, 2021
Add syntax highlighting for 'clean {}' block #208
Merged
@andyleejordan

Andy Jordan (andyleejordan) commented Oct 14, 2021

Copy link
Copy Markdown
Member

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

vexx32 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@andyleejordan Andy Jordan (andyleejordan) closed this Oct 14, 2021
@andyleejordan

Andy Jordan (andyleejordan) commented Oct 14, 2021

Copy link
Copy Markdown
Member

Replaced by #208

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI mentioned this pull request Aug 27, 2026
Add syntax highlighting for dispose blocks and fix test assertions #226
Draft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@msftrncs Carl Morris (msftrncs) msftrncs left review comments
@TylerLeonhardt TylerLeonhardt TylerLeonhardt approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@vexx32 @andyleejordan @TylerLeonhardt @msftrncs
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.