GithubHelp home page GithubHelp logo

axafrance / extensions-dependency-injection Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 6.0 120 KB

Microsoft Extensions DependencyInjection for WCF, and asp.net classic projects

License: MIT License

C# 100.00%
dependency-injection dotnet extensions guildevopen microsoft package

extensions-dependency-injection's People

Contributors

g7ed6e avatar jlou avatar julien-vandenbussche avatar papstops avatar remija avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

extensions-dependency-injection's Issues

Change the license

Issue Template

Summary

The license is currently Axa France. It is not a valid legal entity. It should be Axa France IARD / Axa France VIE

Expected Behavior

The license should be Axa France IARD / Axa France VIE

Current Behavior

The license is Axa France

do not forget date in licence

Thanks for this awesome library :)

Please don't forget date into the Licence which is important for legal.

sample :
Copyright (c) 2019 Axa France IARD / Axa France VIE

ps: I won't do the PR because I want you to learn :p

Singleton services are not disposed when IIS server is stopped.

Summary

I made a disposable service and AddSingleton().
Then I stopped the IIS Server, but the Dispose() method hasn't been called.

Simplest Example to Reproduce

public class TestService : IDisposable {
    public TestService(){
        Debug.WriteLine("The service has been created.");
    }

    public void Dispose() {
        Debug.WriteLine("The service has been disposed.");
    }
}
services.AddSingleton<TestService>();
pubic HomeController(TestService test) {
    
}

Expected Behavior

In Debug console:

The service has been created.
The service has been disposed.

Current Behavior

In Debug console:

The service has been created.

Possible Solution

In Global.asax.cs add some code to dispose the provider.

private IDisposable _provider;

public void Application_Start(){
    // creating and setting a service provider...

    _provider = provider;    
}

public void Application_End(){
    _provider?.Dispose();
}

Context

Is it a correct solution?

Your Environment

Software Version
<PROJECT_NAME>
<BUILD_TOOL> Visual Studio 2019
Operating System Windows 10

setup editorconfig file

Issue Template

Summary

It would be great to have a consistent coding style across the codebase.

Possible Solution

Use an .editorconfig file

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.