- use new FindRegistration<>() method for IsTypeRegistered<>() as well

pull/43/head
Simon G 5 years ago
parent f58e5f1254
commit 7a22bdaf12
  1. 2
      LightweightIocContainer/IocContainer.cs

@ -608,7 +608,7 @@ namespace LightweightIocContainer
/// </summary>
/// <typeparam name="T">The given <see cref="Type"/></typeparam>
/// <returns>True if the given <see cref="Type"/> is registered with this <see cref="IocContainer"/>, false if not</returns>
public bool IsTypeRegistered<T>() => _registrations.Any(registration => registration.InterfaceType == typeof(T)); //TODO: Use FindRegistration<>()?
public bool IsTypeRegistered<T>() => FindRegistration<T>() != null;
/// <summary>
/// The <see cref="IDisposable.Dispose"/> method

Loading…
Cancel
Save