Skip to content

Ability to specify proxy generator or invalidate it #925

@bclothier

Description

@bclothier

This was originally opened here.

Basically, the issue is that Moq uses a single ProxyGenerator, which is fine for 99% of the scenarios. However, I have a scenario where I'm dealing with types that get created at runtime and consequently, can cause collisions with the proxy type cache because the type can change.

The ideal solution would be to be able to use a MockRepository and provide a proxy generator or at least specify that it should use its own proxy generator, separate from the rest of proxy generator, so that any mocks based on those volatile types won't get cached for very long and can be easily invalidated.

Back this issue
Back this issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions