/// <summary> /// Adds <paramref name = "types" /> as additional services to be exposed by this component. /// </summary> /// <param name = "types">The types to forward.</param> /// <returns></returns> public ComponentRegistration <TService> Forward(IEnumerable <Type> types) { foreach (var type in types) { ComponentServicesUtil.AddService(potentialServices, type); } return(this); }
/// <summary> /// Add service to be exposed by this <see cref = "ComponentModel" /> /// </summary> /// <param name = "type"></param> public void AddService(Type type) { if (type == null) { return; } if (type.IsValueType) { throw new ArgumentException("Type {0} is a value type and can not be used as a service."); } ComponentServicesUtil.AddService(services, type); }