private void SetUpComponentForwardedTypes(IKernelInternal kernel, IConfiguration component, string typeName, string id,
		                                          IConversionManager converter)
		{
			if (kernel == null)
			{
				return;
			}
			var forwardedTypes = component.Children["forwardedTypes"];
			if (forwardedTypes == null)
			{
				return;
			}

			var forwarded = new List<Type>();
			foreach (var forwardedType in forwardedTypes.Children
				.Where(c => c.Name.Equals("add", StringComparison.InvariantCultureIgnoreCase)))
			{
				var forwardedServiceTypeName = forwardedType.Attributes["service"];
				try
				{
					forwarded.Add(converter.PerformConversion<Type>(forwardedServiceTypeName));
				}
				catch (Exception e)
				{
					throw new Exception(
						string.Format("Component {0}-{1} defines invalid forwarded type.", id ?? string.Empty, typeName), e);
				}
			}

			foreach (var forwadedType in forwarded)
			{
				kernel.RegisterHandlerForwarding(forwadedType, id);
			}
		}