Skip to content

Instantly share code, notes, and snippets.

@bbehrens
Created September 23, 2010 19:12
Show Gist options
  • Save bbehrens/594172 to your computer and use it in GitHub Desktop.
Save bbehrens/594172 to your computer and use it in GitHub Desktop.
if (ExtensionProperties.HasExtensionFor(typeof(T)))
{
var componentType = typeof(ExtensionComponent<>).MakeGenericType(ExtensionProperties.ExtensionFor(typeof(T)));
if (componentType != null)
{
var component = Activator.CreateInstance(componentType) as IComponentMappingProvider;
(Components as IList<IComponentMappingProvider>).Add(component);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment