public Component(string id, TypeData limitType, IEnumerable<Service> services, OwnershipModel ownership, SharingModel sharing, IDictionary<string, string> metadata, ActivatorModel activator, LifetimeModel lifetime, string targetComponentId = null) { if (limitType == null) throw new ArgumentNullException("limitType"); if (services == null) throw new ArgumentNullException("services"); if (metadata == null) throw new ArgumentNullException("metadata"); _id = id; _limitType = limitType; _services = services.ToArray(); _ownership = ownership; _sharing = sharing; _metadata = metadata; _activator = activator; _lifetime = lifetime; _targetComponentId = targetComponentId; }
public Service(string description, TypeData serviceType = null, string key = null) { if (description == null) throw new ArgumentNullException("description"); _serviceType = serviceType; _key = key; if (serviceType == null) _description = description; else { _description = serviceType.Identity.DisplayName; if (key != null) { _description += " (" + key + ")"; } } }