GithubHelp home page GithubHelp logo

tim-maes / bindicate.example Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20.63 MB

Example of how autowiring is configured using Bindicate

JavaScript 12.88% HTML 21.93% TypeScript 36.00% CSS 2.23% C# 26.96%

bindicate.example's Introduction

Bindicate.Example

Example of how DI autowiring is configured using Bindicate

Bindicate.Host

This project is a default scaffolded .NET API & Angular template. Project and ProjectWithOptions are referenced and they both use Bindicate to decorate the services. In the WeatherForecastController we inject the services that are added to the IServiceCollection from the other projects and use them. We pass the configuration to the project that needs IOptions<T>

Bindicate.Project

This projects holds a few services that are decorated with Bindicate attributes.

Bindicate.ProjectWithOptions

This project holds a service that uses IOptions<T> to use values from appsettings.json which are also decorated with Bindicate attributes.<

Testing

Just run the solution with Bindicate.Host as startup project and navigate to 'fetch data'. If you set a breakpoint in the WeatherForecastController method, you see that the injected services are working.

bindicate.example's People

Contributors

tim-maes avatar

Watchers

 avatar

bindicate.example's Issues

More examples

We could extend the project with more examples. A service for each lifetime, and a generic repository

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.