Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Add support for "poor man's DI" (without container) #13

@BrunoJuchli

Description

@BrunoJuchli

Enable support for StaticProxy.Fody in scenarios where the user does not use a DI Container.

Ideas / Alternatives:

  • Add an alternative to new by something like StaticProxy.New(() => new MyProxiedType(argument1, argument2), .. list of interceptors...) which, upon compilation, will be replaced by `new MyProxiedType(argument1, argument2, interceptors)
  • same syntax but no IL-Weaving: use Activator.Activate to supply all parameters
    Use a syntax as in Ninject's ".ToConstructor" binding to specify
  • other?

To progress, first investigate the constraints these alternatives have (for example, are there targets where Activator.Activate is not supported? Are Expressions supported?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions