Skip to content

gredar11/LifeTimeAttributes

Repository files navigation

LifetimeAttributes

This library was created to make service registration into DI container easier. Advantages:

  • You no longer need to write a long registration code in a separate file ServiceCollectionExtensions.
  • It is easy to understand what kind of life cycle the service has

Plans:

Functionality

  • Attributes of different life cycles
[Transient]
public class Service1{}
[Scoped]
public class Service2{}
[Singleton]
public class Service2{}
  • Registration of tagged services
serviceCollection.AddServicesWithLifetimeAttribute();

Static analysis:

  • Checking the implementation by the class of the interface specified in the attribute

Implementation analyzer

  • Checking that if the registered class has a Singleton life cycle, so that the infected classes also have such a cycle

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages