Skip to content

[Bug] DynamicClassFactory not caching generated types #84

@HunterMcEwan

Description

@HunterMcEwan

Inside DynamicClassFactory.CreateType it appears to be attempting to cache previously generated types with the same property names. However it is using different strategies for creating the dictionary key when doing the lookups:

string fullName = string.Join("|", names.Select(Escape).ToArray());

if (!GeneratedTypes.TryGetValue(fullName, out type))

and then later when doing the updates:

type = GeneratedTypes.GetOrAdd(fullName + "|_" + (createParameterCtor ? "1" : "0"), type);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions