You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for string interpolation conversions on user-defined methods #21
Just wanted to capture the suggestion made by @fsateler in issue #19 to allow users to annotate their own methods with a custom attribute which would allow the Convert to String Interpolation refactoring to run on them:
Activity
pharring commentedon Jul 22, 2015
Where does that attribute come from?
fsateler commentedon Jul 22, 2015
@pharring it should be defined by CSharp essentials. This would probably require to provide the nuget package (#15)
Bryan-Legend commentedon Jul 28, 2015
Resharper defines a StringFormatMethodAttribute for this:
http://www.jetbrains.com/resharper/help/Code_Analysis__String_Formatting_Methods.html
I've looked thru the .net framework in hopes of finding something built in and applicable, but couldn't find anything exact.
Perhaps we could use suppressmessageattribute to turn it on instead of off!
https://msdn.microsoft.com/en-us/library/system.diagnostics.codeanalysis.suppressmessageattribute(v=vs.110).aspx
Maybe [Category("Format")] or [Category("StringFormatMethod")]?
https://msdn.microsoft.com/en-us/library/system.componentmodel.categoryattribute.aspx?f=255&MSPPError=-2147217396