Skip to content

Invalidate type cache for proxies based on dynamic types? #472

@bclothier

Description

@bclothier

I'm using DynamicProxy indirectly via Moq and I'm running into a problem. AIUI, DynamicProxy maintains a cache of types that were generated. As long the types don't change, this is OK. However, in my scenario, I'm dealing with types that do get changed in runtime, and as a consequence, subsequent invocation of the mocks based on those types fails with exceptions like MissingMethodException or such.

Is there a way to ensure that certain types will never be cached or effect an invalidation of the types?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions