Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7182439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:46:16+00:00 2026-05-28T17:46:16+00:00

Does anyone have some sample code of using a castle windsor InstallerFactory for ordering

  • 0

Does anyone have some sample code of using a castle windsor InstallerFactory for ordering the installation of Installers?

Can’t seem to find it in the docs or elsewhere.

Cheers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:46:17+00:00Added an answer on May 28, 2026 at 5:46 pm

    You can only use the InstallerFactory in conjunction with the FromAssembly class.

    When using FromAssembly you should not rely on the order in which your installers will be instantiated/installed. It is non-deterministic which means you never know what it’s going to be. If you need to install the installers in some specific order, use InstallerFactory.

    In addition to that you should inherit from the InstallerFactory class and apply your own rules regarding the instantiation of particular installer types.

    All of the above methods have an overload that takes an InstallerFactory instance. Most of the time you won’t care about it and things will just work. However if you need to have tighter control over installers from the assembly (influence order in which they are installed, change how they’re instantiated or install just some, not all of them) you can inherit from this class and provide your own implementation to accomplish these goals.

    Sample class could look like this:

    public class CustomInstallerFactory : InstallerFactory
    {
        public override IEnumerable<Type> Select(IEnumerable<Type> installerTypes)
        {
            return installerTypes.Reverse(); // just as an example
        }
    }
    

    And here is the code for the container initialization:

    IWindsorContainer container = new WindsorContainer().Install(FromAssembly.This(new CustomInstallerFactory()));
    

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have some sample code showing how to POST to a URL using
Does anyone have some good hints for writing test code for database-backend development where
Does anyone have some code that will take a TimeZoneInfo field from .NET and
Does anyone have some useful beginner tutorials and code snippets for playing with basic
Does anyone have some numbers on this? I am just looking for a percentage,
Does anyone have some guidelines or links to articles when designing a website that
Does anyone have some good information on the usage of the .SaveChanges() method? I
Does anyone have some helpful links to find out about Android Uri's? For example,
Ok, does anyone have some good resources for Access 2007 features regarding triggers or
Does anyone have any thoughts on this method? I have did some performance testing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.