Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions TUnit.Engine/Extensions/JsonExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static TestJson ToJsonModel(this TestContext context)
classParamTypeNames = new string[classParameterTypes.Length];
for (var i = 0; i < classParameterTypes.Length; i++)
{
classParamTypeNames[i] = classParameterTypes[i].FullName ?? "Unknown";
classParamTypeNames[i] = classParameterTypes[i]?.FullName ?? classParameterTypes[i]?.Name ?? "Unknown";
}
}
else
Expand All @@ -77,7 +77,7 @@ public static TestJson ToJsonModel(this TestContext context)
var methodParamTypeNames = new string[methodParameters.Length];
for (var i = 0; i < methodParameters.Length; i++)
{
methodParamTypeNames[i] = methodParameters[i].Type.FullName ?? "Unknown";
methodParamTypeNames[i] = methodParameters[i].Type?.FullName ?? methodParameters[i].Type?.Name ?? "Unknown";
}

return new TestJson
Expand Down
2 changes: 2 additions & 0 deletions TUnit.Engine/Services/PropertyInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ private Task InjectSourceGeneratedPropertiesAsync(
}

[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Source-gen properties are AOT-safe")]
[UnconditionalSuppressMessage("Trimming", "IL2075", Justification = "ContainingType is annotated with DynamicallyAccessedMembers in PropertyInjectionMetadata")]
private async Task InjectSourceGeneratedPropertyAsync(
object instance,
PropertyInjectionMetadata metadata,
Expand Down Expand Up @@ -376,6 +377,7 @@ private Task RecurseIntoNestedPropertiesAsync(
return Task.CompletedTask;
}

[UnconditionalSuppressMessage("Trimming", "IL2075", Justification = "ContainingType is annotated with DynamicallyAccessedMembers in PropertyInjectionMetadata")]
private async Task RecurseIntoNestedPropertiesCoreAsync(object instance, PropertyInjectionPlan plan,
ConcurrentDictionary<string, object?> objectBag, MethodMetadata? methodMetadata, TestContextEvents events,
ConcurrentDictionary<object, byte> visitedObjects, CancellationToken cancellationToken)
Expand Down
Loading