xunit-logging icon indicating copy to clipboard operation
xunit-logging copied to clipboard

Add [StringSyntax] attributes

Open martincostello opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

A new attribute, [StringSyntax], is being added to .NET 7 that allows tools such as Visual Studio to provide syntax highlighting etc. for string variables that expect certain formats (JSON, URI, XML, Regex).

Describe the solution you'd like

Add [StringSyntax] to all methods where it would be appropriate. For example this one from #313:

https://github.com/martincostello/xunit-logging/blob/e8c828ad155ab0c33003cbc604d249e734b45757/src/Logging.XUnit/XUnitLoggerOptions.cs#L37-L43

Describe alternatives you've considered

None.

Additional context

The attribute is supported when targeting versions earlier than .NET 7 by compiling the attribute into the assembly itself: https://github.com/dotnet/runtime/issues/62505#issuecomment-1044637548

martincostello avatar May 17 '22 10:05 martincostello