Skip to content

CyberMonster/Cyclamen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build and push

Present [Inject] attribute.

This attribute is an easy way to make dependency injection via property or field.

It was better to use constructor injection. But some times when you can't use non-default constructor use this attribute.

[Inject] usage:

public class Foo
{
    [Inject]
    private IBar _bar;

    public Foo()
        => this.InjectProperties(App.Factory);
}
public class Foo
{
    [Inject]
    private IBar Bar { get; set; }

    public Foo()
        => this.InjectProperties(App.Factory);
}

About

Property injection support for MS IoC container

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages