Wpf: Use nameof(SRID.PropertyName) syntax instead of depending on GenerateResxSource.GenerateResourcesCodeAsConstants

Created on 2 Nov 2018  路  5Comments  路  Source: dotnet/wpf

The codebase currently uses SRID.PropertyName syntax pervasively. This is supplied by an Arcade build task GenerateResxSource to which I have added an additional support for this particular case via GenerateResourcesCodeAsConstants.

There are ~7k instances across the codebase, and ~1k instances of these are likely coming from generated code. Once we have all the code generators ported over to .NET Core, we need to clean up everything and switch them over to use nameof(SRID.PropertyName) syntax.

issue-type-enhancement

Most helpful comment

I actually have a code analyzer that can do that work for us automatically so I'd be happy to do that bit.
image

All 5 comments

I actually have a code analyzer that can do that work for us automatically so I'd be happy to do that bit.
image

Thanks for the offer - that would be helpful. We will likely take this up post Preview 2 once the code generators have been onboarded (possibly rewritten in T4) and fully functional in the netcore codebase.

I assume it is must have for 3.0, right? (setting milestone to 3.0)
It sounds like something easy for community to help with (with @dotMorten as first volunteer :))

No, this is not a must-have for 3.0 - only nice-to-have. I opened this issue as a convenient way to reference it elsewhere in code. There are lots of other things that take precedence that will slowly show up here on GitHub as we start opening them now that we have created this repo here.

Great, I recommend to set the milestone to Future right away in such case to communicate the urgency ;) (thanks @rladuca for doing that!)

Was this page helpful?
0 / 5 - 0 ratings