Steven Robbins is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

grumpydev / TinyIoC

An easy to use, hassle free, Inversion of Control Container for small projects and beginners alike.

Clone this repository (size: 858.0 KB): HTTPS / SSH
hg clone https://bitbucket.org/grumpydev/tinyioc
hg clone ssh://hg@bitbucket.org/grumpydev/tinyioc

Issues

#5 Add "interceptor/decorator" support

Reported by Steven Robbins

Along the lines of:

void RegisterInterceptor<TRegisterType>(Func<TinyIoCContainer, TRegisterType, TRegisterType> interceptAction);

All resolutions would pass though a pipeline of interceptors (if they exist for that type) before being returned.

Status: new Responsible: Steven Robbins Type: enhancement Priority: major
Milestone: none Component: none Version: none

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 Greg Shackles

    written

    One case where this would be useful would be for automatically doing property injection after resolving an object. Something like:

    container
        .Register<IFoo, Foo>()
        .RegisterInterceptor((container, foo) => container.BuildUp(foo));
    

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?