public static void RegisterExportsWithInterception(this IRegistrator registrator, IEnumerable <ExportedRegistrationInfo> infos) { foreach (var info in infos) { var serviceType = info.Exports[0].ServiceType; var serviceKey = info.Exports[0].ServiceKeyInfo.Key; registrator.RegisterInfo(info); var attributes = info.ImplementationType.GetCustomAttributes(typeof(InterceptAttribute), true); foreach (var attribute in attributes) { var interceptAttribute = (InterceptAttribute)attribute; registrator.RegisterInterfaceInterceptor(serviceType, interceptAttribute.InterceptorType, interceptAttribute.Order, serviceKey); } } }