Adding C#, F#, VB to StringSyntaxAttribute#123211
Conversation
Adding 3 constants that represent C#, F#, and Visual Basic to the StringSyntaxAttribute Fix dotnet#122604
There was a problem hiding this comment.
Pull request overview
This pull request adds support for three .NET programming language syntax identifiers to the StringSyntaxAttribute class.
Changes:
- Added three new syntax identifier constants (
CSharp,FSharp,VisualBasic) toStringSyntaxAttributefor programming language code - Added corresponding test cases to verify the new constants can be used with the attribute
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/StringSyntaxAttribute.cs | Added three new const string fields for C#, F#, and VB.NET syntax identifiers |
| src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Diagnostics/CodeAnalysis/StringSyntaxAttributeTests.cs | Added test coverage for the three new syntax identifier constants |
...ibraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/StringSyntaxAttribute.cs
Outdated
Show resolved
Hide resolved
|
Tagging subscribers to this area: @steveisok, @dotnet/area-system-diagnostics |
|
The ref source (https://github.com/dotnet/runtime/blob/main/src/libraries/System.Runtime/ref/System.Runtime.cs) also needs to be updated when new API is added. |
|
Hi @huoyaoyuan I am a first-time contributor to .NET, so please excuse me if I ask some obvious questions If I understood correctly, you are saying that I have to add this
I will push a commit to update this, if this is what is needed |
Update the ref source, as requested by this comment on the PR: dotnet#123211 (comment)
...ibraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/StringSyntaxAttribute.cs
Outdated
Show resolved
Hide resolved
Order the constant names alphabetically
Order the constant names alphabetically in UnitTest and StringSyntaxAttribute
...ibraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/StringSyntaxAttribute.cs
Outdated
Show resolved
Hide resolved
...ibraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/StringSyntaxAttribute.cs
Outdated
Show resolved
Hide resolved
Change 'VB.NET' to 'Visual Basic' Fix Comments
|
Hi @huoyaoyuan |
|
There's no further issue. I'm not official team member and Stephen is sufficient for deciding. |
|
Ok, thanks a lot for letting me know, the tag 'member' beside your name, and your ability to remove and add labels led me to think like that. |
|
/ba-g unrelated db failure |
Adding 3 constants that represent C#, F#, and Visual Basic to the StringSyntaxAttribute Fix #122604

Adding 3 constants that represent C#, F#, and Visual Basic to the StringSyntaxAttribute
Fix #122604