We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Whether to consider replacement, official original: Information: https://learn.microsoft.com/zh-cn/dotnet/standard/serialization/binaryformatter-security-guide#binaryformatter-security- vulnerabilities Controls
The text was updated successfully, but these errors were encountered:
public static class CloneExtensions { public static T DeepCopy<T>(this T obj) where T : class { using var ms = new MemoryStream(); var options = new JsonSerializerOptions { ReferenceHandler = ReferenceHandler.Preserve, PropertyNamingPolicy = JsonNamingPolicy.CamelCase }; JsonSerializer.SerializeAsync(ms, obj, options); ms.Position = 0; return JsonSerializer.Deserialize<T>(ms, options); } }
Sorry, something went wrong.
No branches or pull requests
Whether to consider replacement, official original: Information: https://learn.microsoft.com/zh-cn/dotnet/standard/serialization/binaryformatter-security-guide#binaryformatter-security- vulnerabilities
Controls
The text was updated successfully, but these errors were encountered: