public ServiceKey(Type serviceType, ServiceDefinition definition) { ServiceType = serviceType; ImplementType = definition.GetImplementType(); }
public IServiceContainer Add(ServiceDefinition item) { if (_disposed) { throw new InvalidOperationException("the service container had been disposed"); } if (_services.Any(_ => _.ServiceType == item.ServiceType && _.GetImplementType() == item.GetImplementType())) { return(this); } _services.Add(item); return(this); }
public IServiceContainerBuilder Add(ServiceDefinition item) { if (_services.Any(_ => _.ServiceType == item.ServiceType && _.GetImplementType() == item.GetImplementType())) { return(this); } _services.Add(item); return(this); }