Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ota Mares
    @omares
    nobody here :(
    Ota Mares
    @omares
    hey @seesharper does lightinject support xamarin/mono?
    Ondrej Medek
    @xmedeko
    Hi, the PR seesharper/LightInject#164 should be merged to let the people know about this room.
    HPVRNP
    @HPVRNP
    Hi. I am exploring Light Inject whether it meets our requirements. Below are my requirements: 1) Named service 2) Multiple service interfaces + named key = single instance binding 3) attribute decoration in constructor argument to inject using named key
    I could not find any option for the second item
    robgha01
    @robgha01

    Hi, im converting Structuremap successor Lamar to LightInject and im wondering if there is anyting close to Lamar's IRegistrationConvention https://jasperfx.github.io/lamar/documentation/ioc/registration/auto-registration-and-conventions/#sec4 ?

    Example of what thay look like

    public class ControllerConvention : IRegistrationConvention
        {
            public void ScanTypes(TypeSet types, ServiceRegistry services)
            {
                foreach (var type in types.FindTypes(TypeClassification.All))
                {
                    if (type.CanBeCastTo<Controller>() && !type.IsAbstract)
                    {
                        services.For(type).Use(type).Lifetime = ServiceLifetime.Transient;
                    }
                }
            }
        }

    This changes all "Controllers" lifetime to Transient but other things like registering a type into the ioc etc is possible.