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
[LogProperties(Transitive = true)] will result in generating uncompilable code, if object's property is of List<T> type.
Reproduction Steps
usingSystem.Collections.Generic;usingMicrosoft.Extensions.Logging;namespaceLoggerMessageCodeGen;
#pragma warning disable EXTEXP0003// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.internalpartialclassProgram{staticvoidMain(string[]args){}internalpartialclassLog{[LoggerMessage(EventId=1,EventName="Test",Level=LogLevel.Information)]publicstaticpartialvoidTest(ILoggerlogger,[LogProperties(Transitive=true)]Testobj);}}publicsealedclassTest{// This property will generate bad code when LogProperties.Transitive = true.publicList<string>Blah{get;set;}}
Expected behavior
Generated code should be compilable.
Actual behavior
Generated code doesn't compile.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered:
Description
[LogProperties(Transitive = true)]
will result in generating uncompilable code, if object's property is ofList<T>
type.Reproduction Steps
Expected behavior
Generated code should be compilable.
Actual behavior
Generated code doesn't compile.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: