Refactor collection initializers to use C# 12 collection expressions
This commit updates various files across the Core and WebApp projects to replace traditional collection initializers with C# 12 collection expressions. Changes include modifications to EventAssignment.cs, TeamScheduler_DecisionTree.cs, CareerField.cs, EventDefinition.cs, and several components in the WebApp. These updates enhance code readability and maintainability by adhering to modern C# syntax standards.
This commit is contained in:
@@ -33,15 +33,14 @@ namespace WebApp.Logging
|
||||
LogEventLevel.Information,
|
||||
null, // No exception at Info level
|
||||
messageTemplate,
|
||||
new[]
|
||||
{
|
||||
[
|
||||
new LogEventProperty("OriginalMessage",
|
||||
new ScalarValue(logEvent.MessageTemplate.Render(logEvent.Properties))),
|
||||
new LogEventProperty("SourceContext",
|
||||
logEvent.Properties.GetValueOrDefault("SourceContext") ?? new ScalarValue("Unknown")),
|
||||
new LogEventProperty("RequestPath",
|
||||
logEvent.Properties.GetValueOrDefault("RequestPath") ?? new ScalarValue("Unknown"))
|
||||
});
|
||||
]);
|
||||
|
||||
_wrappedSink.Emit(rewrittenEvent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user