-
Notifications
You must be signed in to change notification settings - Fork 15
Add .NET 9 targets, etc. #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Use latest System.Text.Json for fixed deep clone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 61 out of 70 changed files in this pull request and generated 1 comment.
Files not reviewed (9)
- Directory.Build.props: Language not supported
- Directory.Packages.props: Language not supported
- FacilityCSharp.sln: Language not supported
- global.json: Language not supported
- src/Facility.CodeGen.CSharp/Facility.CodeGen.CSharp.csproj: Language not supported
- src/Facility.ConformanceApi/Facility.ConformanceApi.csproj: Language not supported
- src/Facility.Core.Assertions/Facility.Core.Assertions.csproj: Language not supported
- src/Facility.Core.MessagePack/Facility.Core.MessagePack.csproj: Language not supported
- src/Facility.Core/Facility.Core.csproj: Language not supported
Comments suppressed due to low confidence (1)
src/Facility.Core.MessagePack/MessagePackServiceSerializer.cs:79
- Using MemoryStream.TryGetBuffer without ensuring that the underlying buffer is publicly visible may lead to issues. Consider initializing the MemoryStream using a constructor that enables a publicly visible buffer or use an alternative method to retrieve the buffer safely.
stream1.TryGetBuffer(out var buffer1);
| if (type != value2.GetType()) | ||
| return false; | ||
|
|
||
| return ToJson(value1) == ToJson(value2); |
Copilot
AI
Apr 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using string equality for comparing JSON serialized representations can be sensitive to formatting and ordering differences. Consider using a structured JSON comparator such as JToken.DeepEquals to improve reliability.
| /// <summary> | ||
| /// Deep clones the DTO. | ||
| /// </summary> | ||
| public virtual T DeepClone() => JsonSerializer.Clone((T) this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth a mention in the release notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, thanks.
No description provided.