Giter Site home page Giter Site logo

tinjector's Introduction

TInjector

A simple .NET IoC container with only the features needed for correctly-designed applications.

NOTE: This is very much still under development. I have already re-written the whole thing several times. I'm not certain I'll ever be happy with its performance or design. It is largely just a platform for me to experiment with and basically deep dive into DI and IOC.

Build Status Coverage Status

Design Decisions

  • Only support features necessary for properly designed apps
    • No extensible scopes (prevent messy scope-dependant code)
    • Once a root (container/kernel/etc.) is created lock it against further modification
    • Do not support automatic registration of concrete classes (you should always wrap it in an interface so you can test things that use it)
  • Fully strongly typed fluent configuration interface
  • No reflection in the core lib
    • typeof(T) is allowed to get Type instances to be used as dictionary keys, but no properties or methods on Type instances may be called.
  • High concurrency (lock as little as possible)
  • Support heavy automation (automatic registration wherever reasonable)
    • In some cases this might conflict with not using reflection in the core lib. In such cases the reflection is to be moved to a companion library or the feature that needs it is to be removed all together.
  • Testability (unit test all the code, create an api that allows extensive unit testing of anything using it)
  • Simplicity (of the code, of the api, of the documentation, everywhere)
  • Documented code (XML docs on all protected or public code, notes inside code on pretty much every line)
  • Portability

TODO:

  • Support decorators? (implements the same interface and takes the base implementation as a constructor param)
  • Better method generation in TInjector.Reflection using generated IL (System.Reflection.Emit) or expression trees (System.Linq.Expressions)

tinjector's People

Contributors

bungeemonkee avatar

Stargazers

Andrejs Agejevs avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.