Giter VIP home page Giter VIP logo

Comments (7)

alexmg avatar alexmg commented on July 20, 2024

From [email protected] on March 16, 2008 02:51:02

Labels: -Milestone-Release1.1 Milestone-Release1.2

from autofac.

alexmg avatar alexmg commented on July 20, 2024

From [email protected] on April 10, 2008 15:48:34

Consider means by which private constructors could be selected (perhaps by overriding
methods in ReflectionActivator.)

from autofac.

alexmg avatar alexmg commented on July 20, 2024

From [email protected] on May 19, 2008 17:06:01

Removed milestone - re-evaluation for inclusion in a later release.

Labels: -Milestone-Release1.2

from autofac.

alexmg avatar alexmg commented on July 20, 2024

From [email protected] on June 13, 2008 23:34:53

Labels: Milestone-Release2.0

from autofac.

alexmg avatar alexmg commented on July 20, 2024

From alex.meyergleaves on March 17, 2009 17:50:15

I would certainly like to see this feature implemented even though it may seem like a
bit of a fringe case on the surface. I have done some testing and have been able to
include the functionality with very little effort. Here is what I changed.

  • Added a SearchAllConstructors method to the IReflectiveRegistrar, IGenericRegistrar
    and IAutomaticRegistrar interfaces.
  • Added a SearchAllConstructors property to the IConstructorSelector interface.
  • The boolean value is set on the constructor selector by the method on the registrar.
  • The ReflectionActivator uses the value to choose the binding flags to use.

I went with a Boolean value as if you exclude static constructors and class
initializers then all that is left are public instance constructors and non-public
instance constructors.

The reflective registrations appear like this:

builder.Register(typeof(Foo))
.SearchAllConstructors()
.FactoryScoped();

The generic registrations appear like this:

builder.RegisterTypesAssignableTo()
.SearchAllConstructors()
.FactoryScoped();

The default flags remain Public and Instance. You probably already have something in
mind for this, but if you’re interested I have attached a patch. Maybe you can come
up with a better and more fluent sounding name for the method.

Attachment: SearchAllConstructors.diff

from autofac.

alexmg avatar alexmg commented on July 20, 2024

From [email protected] on March 19, 2009 19:58:48

Thanks for the patch Alex.

Had a quick look through, looks good. I'll try to spend some more time with this
soon, I'm planning to do a bit of refactoring in this area.

from autofac.

alexmg avatar alexmg commented on July 20, 2024

From [email protected] on September 13, 2009 07:58:18

Added BindingFlagsConstructorFinder to trunk (2.1) in r606 .

Status: Fixed
Labels: -Milestone-Release2.0 Milestone-Release2.1

from autofac.

Related Issues (20)

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.