Structuremap class library module
<p>I have a class Library containing some services.</p>

<p>Using structure map i want these services to be registered in that class library. This results in assemblies using this class library should not set dependencies up for this class library but simply call a module that sets this up within the library itself.</p>

<p>For example is this possible to do using autofac. Lets say i have a class library with IAAAService and IBBBService. Using autofac i can in this class library do the following:</p>

<pre><code>public class AutofacModule : Module
{
    protected override void Load(ContainerBuilder builder)
    {
        builder.RegisterType&lt;AAAService&gt;().As&lt;IAAAService&gt;();
        builder.RegisterType&lt;BBBService&gt;().As&lt;IBBBService&gt;();
    }
}
</code></pre>

<p>And from the assembly that should use the library i can do this:</p>

<pre><code>builder.RegisterModule(new AutofacModule());
</code></pre>

<p>I am in a situation where i am bound to use structure map and i want to do something similar.</p>

<p>Is this possible in structure map? If so how would i do that?</p>

<p>Thanks :)</p>