To do this you can either export the global services like you are doing for your "MessageContract". Or if you want to manually add them you can look at using a CompositionBatch with Container.Compose or the helper Container.ComposeExportedValue
might be exactly what you want.

By default MEF will only set the Imports on an object instance that it creates, but in your case you are manually creating Class1. If you want to manually create object instances the only way to get the imports set is to have access to the container and
call ComposeParts on the object instance.