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

Update snippets to use modern language features (eg "nameof") #5574

Closed
Tracked by #56541
ljw1004 opened this issue Sep 30, 2015 · 9 comments
Closed
Tracked by #56541

Update snippets to use modern language features (eg "nameof") #5574

ljw1004 opened this issue Sep 30, 2015 · 9 comments
Labels
Area-IDE Blocked Feature Request Resolution-External The behavior lies outside the functionality covered by this repository
Milestone

Comments

@ljw1004
Copy link
Contributor

ljw1004 commented Sep 30, 2015

The "propdp" snippet spits out a dependency property. I think it should spit out the nameof(.) operator, rather than spitting out a text literal.

propdp

@Pilchie
Copy link
Member

Pilchie commented Oct 2, 2015

As with #3469, we should probably do a sweep through all snippets. One consideration from the past is whether we realistically expect customers to use these snippets in scenarios where they would set their "langversion" switch back, since we don't have a mechanism to do different things in snippets.

@Pilchie Pilchie added this to the 1.2 milestone Oct 2, 2015
@dpoeschl dpoeschl modified the milestones: 1.3, 1.2 Feb 1, 2016
@dpoeschl dpoeschl modified the milestones: 2.0 (RC), 1.3 Mar 30, 2016
@miloush
Copy link

miloush commented Apr 28, 2016

This snippet is actually one of the worst from the very beginning. Apart from nameof,

  • you have to delete the comment every single time
  • it should use ClassName() to fill in the ownerclass
  • does not support specifying derived metadata
  • is cumbersome to use for declaring multiple properties consequently

plus my personal preferences do not improve it,

  • I put the static declaration on a single line
  • I put static members before instance ones

(and snippets for read-only DP and attached DP are missing completely)
I have submitted Connnect feedback about that long time ago but that seems to be gone now.

As for "langversion", snippets has <Function> thing that [I think has great potential but is underdeveloped and] could potentially handle it if needed.

Could perhaps the snippets be put on GitHub or somewhere were people could contribute to them?

@rchande rchande changed the title propdp snippet should use "nameof" Update snippets to use modern language features (eg "nameof") Sep 16, 2016
@rchande rchande modified the milestones: 2.1, 2.0 (Preview 5) Sep 16, 2016
@Pilchie Pilchie modified the milestones: 15.1, 15.3 Mar 29, 2017
@Pilchie Pilchie modified the milestones: 16.0, 15.3 Apr 7, 2017
@jinujoseph jinujoseph modified the milestones: 16.0, Backlog Jan 18, 2019
@sharwell
Copy link
Member

sharwell commented Jun 6, 2019

Blocked on #31879

@DaveInCaz
Copy link

The classname issue is mentioned in https://stackoverflow.com/q/35410712/3195477 which also proposes a workaround.

@jmarolf jmarolf mentioned this issue Nov 25, 2021
5 tasks
@jmarolf jmarolf added the User Story A single user-facing feature. Can be grouped under an epic. label Dec 3, 2021
@jmarolf jmarolf removed the User Story A single user-facing feature. Can be grouped under an epic. label Jan 6, 2022
@jmarolf jmarolf modified the milestones: Backlog, 17.2 Jan 8, 2022
@jinujoseph jinujoseph modified the milestones: 17.2, 17.3 May 5, 2022
@CyrusNajmabadi
Copy link
Member

Snippets are being entirely revamped. So we're unlikely to update these snippets.

@CyrusNajmabadi CyrusNajmabadi added the Need More Info The issue needs more information to proceed. label Feb 7, 2023
@sharwell
Copy link
Member

sharwell commented Feb 7, 2023

@CyrusNajmabadi Can you clarify what additional info is needed?

@ghost ghost added untriaged Issues and PRs which have not yet been triaged by a lead and removed Need More Info The issue needs more information to proceed. labels Feb 7, 2023
@CyrusNajmabadi
Copy link
Member

Need more info on if we're actually intending on giving these snippets a future.

@sharwell
Copy link
Member

sharwell commented Feb 7, 2023

Ah, sounds like the triage was already correct on this issue (blocked on a linked issue). I moved the issue to backlog and it can be handled as a follow-up to the blocking issue.

@sharwell sharwell removed the untriaged Issues and PRs which have not yet been triaged by a lead label Feb 7, 2023
@sharwell sharwell modified the milestones: 17.3, Backlog Feb 7, 2023
@CyrusNajmabadi
Copy link
Member

AFAICT, legacy snippets have no future and are not being maintained at all. Semantic snippets are the only place we're investing in. Closing out as out of scope for roslyn now.

@CyrusNajmabadi CyrusNajmabadi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2023
@CyrusNajmabadi CyrusNajmabadi added the Resolution-External The behavior lies outside the functionality covered by this repository label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Blocked Feature Request Resolution-External The behavior lies outside the functionality covered by this repository
Projects
None yet
Development

No branches or pull requests