GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — feat(serialization): add type and assembly allow-list helpers by ReubenBond · Pull Request #10228 · dotnet/orleans Conversation
|
| File | Description |
|---|---|
| test/Orleans.Serialization.UnitTests/TypeConverterTests.cs | Updates allow-list tests to use new helpers; adds coverage for constructed nested generics, allowed assemblies, and enums. |
| src/Orleans.Serialization/TypeSystem/TypeConverter.cs | Implements configured assembly allow-listing, enum allowance, and improved allow-list handling for configured allowed types. |
| src/Orleans.Serialization/README.md | Documents enum allowance and the new allow-list helper APIs. |
| src/Orleans.Serialization/Configuration/TypeManifestOptions.cs | Adds AllowedAssemblies and helper methods to format/insert allowed types and assemblies consistently. |
| src/api/Orleans.Serialization/Orleans.Serialization.cs | Updates public API surface to include the new options members and helper methods. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
9efbcfb to
2625b9f
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
c576c54 to
ace447a
Compare
There was an error while loading. Please reload this page.
2f2ec32 to
3b3b8b5
Compare
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
7fafb83 to
e4d3eb5
Compare
Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
src/Orleans.Serialization/TypeSystem/TypeConverter.cs:611
InspectGenericArguments uses LINQ (GenericTypeArguments.Select(InspectTypeCore)), which allocates an iterator and can add overhead on a hot path (type formatting/parsing). This file had to add using System.Linq; solely for that. Consider replacing this with a simple foreach to avoid allocations and keep the method allocation-free. private bool? InspectGenericArguments(Type type)
{
foreach (var result in type.GenericTypeArguments.Select(InspectTypeCore))
{
if (result != true)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Copilot App <[email protected]>
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
src/Orleans.Serialization/TypeSystem/TypeConverter.cs:399
IsNamedTypeAllowed returns true for names present in _allowedTypesConfiguration without updating the _allowedTypes cache. For configs which allow types by unqualified name (eg options.AllowedTypes.Add(typeof(Foo).FullName)), this means the same assembly-qualified QualifiedType will miss the cache on every call and still pay the cost of running ITypeNameFilter instances (via InspectTypeNameFilters) each time.Since InspectTypeNameFilters has already had an opportunity to deny (false) before this branch, it should be safe to cache the allow decision for the current QualifiedType key here as well, improving performance and making caching behavior more consistent.
if (_allowedTypesConfiguration.Contains(type.Type))
{
return true;
}
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.