Register Generic
    container.Configure(
       c => c.Export<SomeClass>().
              As<ISomeClass>().
              ImportProperty(x => x.SomeProperty));

When you register a type using the generic interface you can specify which properties and methods to import in a Type safe manner.

Register Non Generic
    container.Configure(
        c => c.Export(typeof(SomeClass)).
               As(typeof(ISomeClass)).
               ImportProperty("SomeProperty"));     

Sometimes it's useful to register classes in a non generic manner, for example registering open generic classes or you are handed the type at runtime.

Register classes in bulk
    container.Configure(
         c => c.ExportAssembly(YourAssembly).ExportInterface(typeof(ISimpleObject)));


Using the ExportInterface, ExportInterfaces and ExportTypesBasedOn you can export multiple classes at the same time

Last edited Nov 11, 2013 at 3:50 PM by ipjohnson123, version 13