- use file scoped namespaces

pull/59/head
Simon G 3 years ago
parent e5b984a058
commit 430f58e1c4
  1. 5
      LightweightIocContainer/ActionExtension.cs
  2. 5
      LightweightIocContainer/EnumerableExtension.cs
  3. 5
      LightweightIocContainer/Exceptions/CircularDependencyException.cs
  4. 5
      LightweightIocContainer/Exceptions/ConstructorNotMatchingException.cs
  5. 5
      LightweightIocContainer/Exceptions/GenericMethodNotFoundException.cs
  6. 5
      LightweightIocContainer/Exceptions/IllegalAbstractMethodCreationException.cs
  7. 5
      LightweightIocContainer/Exceptions/InternalResolveException.cs
  8. 5
      LightweightIocContainer/Exceptions/InvalidFactoryRegistrationException.cs
  9. 5
      LightweightIocContainer/Exceptions/InvalidRegistrationException.cs
  10. 5
      LightweightIocContainer/Exceptions/IocContainerException.cs
  11. 5
      LightweightIocContainer/Exceptions/MultipleRegistrationException.cs
  12. 5
      LightweightIocContainer/Exceptions/MultitonResolveException.cs
  13. 5
      LightweightIocContainer/Exceptions/NoMatchingConstructorFoundException.cs
  14. 5
      LightweightIocContainer/Exceptions/NoPublicConstructorFoundException.cs
  15. 5
      LightweightIocContainer/Exceptions/TypeNotRegisteredException.cs
  16. 5
      LightweightIocContainer/Exceptions/UnknownRegistrationException.cs
  17. 5
      LightweightIocContainer/Factories/CustomTypedFactory.cs
  18. 5
      LightweightIocContainer/Factories/TypedFactory.cs
  19. 5
      LightweightIocContainer/Factories/TypedFactoryBase.cs
  20. 5
      LightweightIocContainer/GenericMethodCaller.cs
  21. 5
      LightweightIocContainer/Installers/AssemblyInstaller.cs
  22. 5
      LightweightIocContainer/Installers/FromAssembly.cs
  23. 5
      LightweightIocContainer/Interfaces/Factories/ITypedFactory.cs
  24. 5
      LightweightIocContainer/Interfaces/IIocContainer.cs
  25. 5
      LightweightIocContainer/Interfaces/IIocResolver.cs
  26. 5
      LightweightIocContainer/Interfaces/Installers/IAssemblyInstaller.cs
  27. 5
      LightweightIocContainer/Interfaces/Installers/IIocInstaller.cs
  28. 5
      LightweightIocContainer/Interfaces/Registrations/Fluent/IOnCreate.cs
  29. 5
      LightweightIocContainer/Interfaces/Registrations/Fluent/IWithFactory.cs
  30. 5
      LightweightIocContainer/Interfaces/Registrations/Fluent/IWithParameters.cs
  31. 5
      LightweightIocContainer/Interfaces/Registrations/ILifestyleProvider.cs
  32. 5
      LightweightIocContainer/Interfaces/Registrations/IMultipleMultitonRegistration.cs
  33. 5
      LightweightIocContainer/Interfaces/Registrations/IMultipleRegistration.cs
  34. 5
      LightweightIocContainer/Interfaces/Registrations/IMultitonRegistration.cs
  35. 5
      LightweightIocContainer/Interfaces/Registrations/IOpenGenericRegistration.cs
  36. 5
      LightweightIocContainer/Interfaces/Registrations/IRegistration.cs
  37. 5
      LightweightIocContainer/Interfaces/Registrations/IRegistrationBase.cs
  38. 5
      LightweightIocContainer/Interfaces/Registrations/ISingleTypeRegistration.cs
  39. 5
      LightweightIocContainer/Interfaces/Registrations/ITypedFactoryRegistration.cs
  40. 5
      LightweightIocContainer/Interfaces/Registrations/ITypedRegistration.cs
  41. 5
      LightweightIocContainer/IocContainer.cs
  42. 5
      LightweightIocContainer/Lifestyle.cs
  43. 5
      LightweightIocContainer/Registrations/MultipleMultitonRegistration.cs
  44. 5
      LightweightIocContainer/Registrations/MultipleRegistration.cs
  45. 5
      LightweightIocContainer/Registrations/MultitonRegistration.cs
  46. 5
      LightweightIocContainer/Registrations/OpenGenericRegistration.cs
  47. 5
      LightweightIocContainer/Registrations/RegistrationBase.cs
  48. 5
      LightweightIocContainer/Registrations/RegistrationFactory.cs
  49. 5
      LightweightIocContainer/Registrations/SingleTypeRegistration.cs
  50. 5
      LightweightIocContainer/Registrations/TypedFactoryRegistration.cs
  51. 5
      LightweightIocContainer/Registrations/TypedRegistration.cs
  52. 5
      LightweightIocContainer/ResolvePlaceholders/InternalResolvePlaceholder.cs
  53. 5
      LightweightIocContainer/ResolvePlaceholders/InternalToBeResolvedPlaceholder.cs
  54. 5
      LightweightIocContainer/TypeExtension.cs
  55. 5
      LightweightIocContainer/Validation/IocValidator.cs
  56. 5
      Test.LightweightIocContainer/ActionExtensionTest.cs
  57. 5
      Test.LightweightIocContainer/AssemblyInstallerTest.cs
  58. 5
      Test.LightweightIocContainer/EnumerableExtensionTest.cs
  59. 5
      Test.LightweightIocContainer/FluentFactoryRegistrationTest.cs
  60. 5
      Test.LightweightIocContainer/IocContainerInterfaceSegregationTest.cs
  61. 5
      Test.LightweightIocContainer/IocContainerParameterRegistrationTest.cs
  62. 5
      Test.LightweightIocContainer/IocContainerRecursionTest.cs
  63. 5
      Test.LightweightIocContainer/IocContainerTest.cs
  64. 5
      Test.LightweightIocContainer/IocValidatorTest.cs
  65. 5
      Test.LightweightIocContainer/MultipleMultitonRegistrationTest.cs
  66. 5
      Test.LightweightIocContainer/OnCreateTest.cs
  67. 5
      Test.LightweightIocContainer/OpenGenericRegistrationTest.cs
  68. 5
      Test.LightweightIocContainer/RegistrationBaseTest.cs
  69. 5
      Test.LightweightIocContainer/SingleTypeRegistrationTest.cs

@ -4,8 +4,8 @@
using System; using System;
namespace LightweightIocContainer namespace LightweightIocContainer;
{
internal static class ActionExtension internal static class ActionExtension
{ {
/// <summary> /// <summary>
@ -23,4 +23,3 @@ namespace LightweightIocContainer
return t => action(t); return t => action(t);
} }
} }
}

@ -6,8 +6,8 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
namespace LightweightIocContainer namespace LightweightIocContainer;
{
internal static class EnumerableExtension internal static class EnumerableExtension
{ {
/// <summary> /// <summary>
@ -63,4 +63,3 @@ namespace LightweightIocContainer
action(item); action(item);
} }
} }
}

@ -7,8 +7,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// A circular dependency was detected during <see cref="IocContainer.Resolve{T}()"/> /// A circular dependency was detected during <see cref="IocContainer.Resolve{T}()"/>
/// </summary> /// </summary>
@ -58,4 +58,3 @@ namespace LightweightIocContainer.Exceptions
} }
} }
} }
}

@ -5,8 +5,8 @@
using System; using System;
using System.Reflection; using System.Reflection;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// The constructor does not match the given or resolvable arguments /// The constructor does not match the given or resolvable arguments
/// </summary> /// </summary>
@ -26,4 +26,3 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public ConstructorInfo Constructor { get; } public ConstructorInfo Constructor { get; }
} }
}

@ -4,8 +4,8 @@
using System; using System;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// Could not find generic method /// Could not find generic method
/// </summary> /// </summary>
@ -21,4 +21,3 @@ namespace LightweightIocContainer.Exceptions
} }
} }
}

@ -4,8 +4,8 @@
using System.Reflection; using System.Reflection;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// The creation of the abstract method is illegal in its current state /// The creation of the abstract method is illegal in its current state
/// </summary> /// </summary>
@ -25,4 +25,3 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public MethodInfo Method { get; } public MethodInfo Method { get; }
} }
}

@ -4,8 +4,8 @@
using LightweightIocContainer.Interfaces; using LightweightIocContainer.Interfaces;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// An internal Error happened while the <see cref="IIocContainer"/> tried to resolve an instance /// An internal Error happened while the <see cref="IIocContainer"/> tried to resolve an instance
/// </summary> /// </summary>
@ -21,4 +21,3 @@ namespace LightweightIocContainer.Exceptions
} }
} }
}

@ -2,8 +2,8 @@
// Created: 2019-05-20 // Created: 2019-05-20
// Copyright(c) 2019 SimonG. All Rights Reserved. // Copyright(c) 2019 SimonG. All Rights Reserved.
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// The registration of a Factory is not valid /// The registration of a Factory is not valid
/// </summary> /// </summary>
@ -19,4 +19,3 @@ namespace LightweightIocContainer.Exceptions
} }
} }
}

@ -2,8 +2,8 @@
// Created: 2019-05-20 // Created: 2019-05-20
// Copyright(c) 2019 SimonG. All Rights Reserved. // Copyright(c) 2019 SimonG. All Rights Reserved.
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// The registration is not valid /// The registration is not valid
/// </summary> /// </summary>
@ -19,4 +19,3 @@ namespace LightweightIocContainer.Exceptions
} }
} }
}

@ -5,8 +5,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// A base <see cref="Exception"/> for the <see cref="LightweightIocContainer"/> /// A base <see cref="Exception"/> for the <see cref="LightweightIocContainer"/>
/// </summary> /// </summary>
@ -39,4 +39,3 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public List<Exception> InnerExceptions { get; protected init; } public List<Exception> InnerExceptions { get; protected init; }
} }
}

@ -5,8 +5,8 @@
using System; using System;
using LightweightIocContainer.Interfaces; using LightweightIocContainer.Interfaces;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// The <see cref="System.Type"/> is already registered differently in this <see cref="IIocContainer"/> /// The <see cref="System.Type"/> is already registered differently in this <see cref="IIocContainer"/>
/// </summary> /// </summary>
@ -25,4 +25,3 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public Type Type { get; } public Type Type { get; }
} }
}

@ -4,8 +4,8 @@
using System; using System;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// An error happened while trying to resolve a multiton /// An error happened while trying to resolve a multiton
/// </summary> /// </summary>
@ -25,4 +25,3 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public Type Type { get; } public Type Type { get; }
} }
}

@ -5,8 +5,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// No matching constructor was found for the given or resolvable arguments /// No matching constructor was found for the given or resolvable arguments
/// </summary> /// </summary>
@ -35,4 +35,3 @@ namespace LightweightIocContainer.Exceptions
/// <param name="exception">The <see cref="ConstructorNotMatchingException"/></param> /// <param name="exception">The <see cref="ConstructorNotMatchingException"/></param>
public void AddInnerException(ConstructorNotMatchingException exception) => InnerExceptions.Add(exception); public void AddInnerException(ConstructorNotMatchingException exception) => InnerExceptions.Add(exception);
} }
}

@ -4,8 +4,8 @@
using System; using System;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// No public constructor can be found for a <see cref="Type"/> /// No public constructor can be found for a <see cref="Type"/>
/// </summary> /// </summary>
@ -24,4 +24,3 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public Type Type { get; } public Type Type { get; }
} }
}

@ -5,8 +5,8 @@
using System; using System;
using LightweightIocContainer.Interfaces; using LightweightIocContainer.Interfaces;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// The <see cref="System.Type"/> is not registered in this <see cref="IIocContainer"/> /// The <see cref="System.Type"/> is not registered in this <see cref="IIocContainer"/>
/// </summary> /// </summary>
@ -25,4 +25,3 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public Type Type { get; } public Type Type { get; }
} }
}

@ -4,8 +4,8 @@
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions;
{
/// <summary> /// <summary>
/// An unknown <see cref="IRegistration"/> was used /// An unknown <see cref="IRegistration"/> was used
/// </summary> /// </summary>
@ -21,4 +21,3 @@ namespace LightweightIocContainer.Exceptions
} }
} }
}

@ -4,8 +4,8 @@
using LightweightIocContainer.Interfaces.Factories; using LightweightIocContainer.Interfaces.Factories;
namespace LightweightIocContainer.Factories namespace LightweightIocContainer.Factories;
{
/// <summary> /// <summary>
/// <see cref="ITypedFactory"/> implementation for custom implemented factories /// <see cref="ITypedFactory"/> implementation for custom implemented factories
/// </summary> /// </summary>
@ -13,4 +13,3 @@ namespace LightweightIocContainer.Factories
{ {
} }
}

@ -10,8 +10,8 @@ using LightweightIocContainer.Exceptions;
using LightweightIocContainer.Interfaces; using LightweightIocContainer.Interfaces;
using LightweightIocContainer.Interfaces.Factories; using LightweightIocContainer.Interfaces.Factories;
namespace LightweightIocContainer.Factories namespace LightweightIocContainer.Factories;
{
/// <summary> /// <summary>
/// Class to help implement an abstract typed factory /// Class to help implement an abstract typed factory
/// </summary> /// </summary>
@ -139,4 +139,3 @@ namespace LightweightIocContainer.Factories
return Creator.CreateInstance<TFactory>(typeBuilder.CreateTypeInfo()!.AsType(), container); return Creator.CreateInstance<TFactory>(typeBuilder.CreateTypeInfo()!.AsType(), container);
} }
} }
}

@ -9,8 +9,8 @@ using System.Reflection;
using LightweightIocContainer.Exceptions; using LightweightIocContainer.Exceptions;
using LightweightIocContainer.Interfaces.Factories; using LightweightIocContainer.Interfaces.Factories;
namespace LightweightIocContainer.Factories namespace LightweightIocContainer.Factories;
{
/// <summary> /// <summary>
/// Base class for the <see cref="ITypedFactory"/> /// Base class for the <see cref="ITypedFactory"/>
/// </summary> /// </summary>
@ -33,4 +33,3 @@ namespace LightweightIocContainer.Factories
} }
} }
} }
}

@ -6,8 +6,8 @@ using System;
using System.Reflection; using System.Reflection;
using LightweightIocContainer.Exceptions; using LightweightIocContainer.Exceptions;
namespace LightweightIocContainer namespace LightweightIocContainer;
{
/// <summary> /// <summary>
/// Helper class to call a generic method without generic type parameters /// Helper class to call a generic method without generic type parameters
/// </summary> /// </summary>
@ -55,4 +55,3 @@ namespace LightweightIocContainer
public static object? CallPrivate(object caller, string functionName, Type genericParameter, params object?[] parameters) => public static object? CallPrivate(object caller, string functionName, Type genericParameter, params object?[] parameters) =>
Call(caller, functionName, genericParameter, BindingFlags.NonPublic | BindingFlags.Instance, parameters); Call(caller, functionName, genericParameter, BindingFlags.NonPublic | BindingFlags.Instance, parameters);
} }
}

@ -9,8 +9,8 @@ using LightweightIocContainer.Interfaces;
using LightweightIocContainer.Interfaces.Installers; using LightweightIocContainer.Interfaces.Installers;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Installers namespace LightweightIocContainer.Installers;
{
/// <summary> /// <summary>
/// An <see cref="IIocInstaller"/> that installs all <see cref="IIocInstaller"/>s for its given <see cref="Assembly"/> /// An <see cref="IIocInstaller"/> that installs all <see cref="IIocInstaller"/>s for its given <see cref="Assembly"/>
/// </summary> /// </summary>
@ -49,4 +49,3 @@ namespace LightweightIocContainer.Installers
installer.Install(registration); installer.Install(registration);
} }
} }
}

@ -5,8 +5,8 @@
using System.Reflection; using System.Reflection;
using LightweightIocContainer.Interfaces.Installers; using LightweightIocContainer.Interfaces.Installers;
namespace LightweightIocContainer.Installers namespace LightweightIocContainer.Installers;
{
/// <summary> /// <summary>
/// Helper class that supplies methods to find the wanted <see cref="Assembly"/> /// Helper class that supplies methods to find the wanted <see cref="Assembly"/>
/// </summary> /// </summary>
@ -29,4 +29,3 @@ namespace LightweightIocContainer.Installers
/// <returns>A new <see cref="IAssemblyInstaller"/> with the given <see cref="Assembly"/></returns> /// <returns>A new <see cref="IAssemblyInstaller"/> with the given <see cref="Assembly"/></returns>
public static IAssemblyInstaller Instance(Assembly assembly) => new AssemblyInstaller(assembly); public static IAssemblyInstaller Instance(Assembly assembly) => new AssemblyInstaller(assembly);
} }
}

@ -5,8 +5,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
namespace LightweightIocContainer.Interfaces.Factories namespace LightweightIocContainer.Interfaces.Factories;
{
/// <summary> /// <summary>
/// Non-generic <see cref="ITypedFactory{TFactory}"/> /// Non-generic <see cref="ITypedFactory{TFactory}"/>
/// </summary> /// </summary>
@ -29,4 +29,3 @@ namespace LightweightIocContainer.Interfaces.Factories
/// </summary> /// </summary>
TFactory Factory { get; set; } TFactory Factory { get; set; }
} }
}

@ -6,8 +6,8 @@ using System;
using LightweightIocContainer.Interfaces.Installers; using LightweightIocContainer.Interfaces.Installers;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Interfaces namespace LightweightIocContainer.Interfaces;
{
/// <summary> /// <summary>
/// The main container that carries all <see cref="IRegistration"/>s /// The main container that carries all <see cref="IRegistration"/>s
/// </summary> /// </summary>
@ -39,4 +39,3 @@ namespace LightweightIocContainer.Interfaces
/// <returns>True if the given <see cref="Type"/> is registered with this <see cref="IIocContainer"/>, false if not</returns> /// <returns>True if the given <see cref="Type"/> is registered with this <see cref="IIocContainer"/>, false if not</returns>
bool IsTypeRegistered<T>(); bool IsTypeRegistered<T>();
} }
}

@ -4,8 +4,8 @@
using System; using System;
namespace LightweightIocContainer.Interfaces namespace LightweightIocContainer.Interfaces;
{
/// <summary> /// <summary>
/// Provides <see cref="Resolve{T}()"/> methods /// Provides <see cref="Resolve{T}()"/> methods
/// </summary> /// </summary>
@ -26,4 +26,3 @@ namespace LightweightIocContainer.Interfaces
/// <returns>An instance of the given <see cref="Type"/></returns> /// <returns>An instance of the given <see cref="Type"/></returns>
T Resolve<T>(params object[] arguments); T Resolve<T>(params object[] arguments);
} }
}

@ -5,8 +5,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
namespace LightweightIocContainer.Interfaces.Installers namespace LightweightIocContainer.Interfaces.Installers;
{
/// <summary> /// <summary>
/// An <see cref="IIocInstaller"/> that installs all <see cref="IIocInstaller"/>s for its given <see cref="Assembly"/> /// An <see cref="IIocInstaller"/> that installs all <see cref="IIocInstaller"/>s for its given <see cref="Assembly"/>
/// </summary> /// </summary>
@ -17,4 +17,3 @@ namespace LightweightIocContainer.Interfaces.Installers
/// </summary> /// </summary>
List<IIocInstaller> Installers { get; } List<IIocInstaller> Installers { get; }
} }
}

@ -4,8 +4,8 @@
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Interfaces.Installers namespace LightweightIocContainer.Interfaces.Installers;
{
/// <summary> /// <summary>
/// The base class for <see cref="IIocContainer"/> installers /// The base class for <see cref="IIocContainer"/> installers
/// </summary> /// </summary>
@ -17,4 +17,3 @@ namespace LightweightIocContainer.Interfaces.Installers
/// <param name="registration">The <see cref="IRegistrationCollector"/> where <see cref="IRegistration"/>s are added</param> /// <param name="registration">The <see cref="IRegistrationCollector"/> where <see cref="IRegistration"/>s are added</param>
void Install(IRegistrationCollector registration); void Install(IRegistrationCollector registration);
} }
}

@ -5,8 +5,8 @@
using System; using System;
using LightweightIocContainer.Interfaces.Installers; using LightweightIocContainer.Interfaces.Installers;
namespace LightweightIocContainer.Interfaces.Registrations.Fluent namespace LightweightIocContainer.Interfaces.Registrations.Fluent;
{
/// <summary> /// <summary>
/// Provides an <see cref="OnCreateAction"/> to the generic <see cref="IOnCreate{TInterface, TImplementation}"/> /// Provides an <see cref="OnCreateAction"/> to the generic <see cref="IOnCreate{TInterface, TImplementation}"/>
/// </summary> /// </summary>
@ -33,4 +33,3 @@ namespace LightweightIocContainer.Interfaces.Registrations.Fluent
/// <returns>The current instance of this <see cref="ITypedRegistration{TInterface,TImplementation}"/></returns> /// <returns>The current instance of this <see cref="ITypedRegistration{TInterface,TImplementation}"/></returns>
ITypedRegistration<TInterface, TImplementation> OnCreate(Action<TImplementation?> action); ITypedRegistration<TInterface, TImplementation> OnCreate(Action<TImplementation?> action);
} }
}

@ -4,8 +4,8 @@
using LightweightIocContainer.Interfaces.Factories; using LightweightIocContainer.Interfaces.Factories;
namespace LightweightIocContainer.Interfaces.Registrations.Fluent namespace LightweightIocContainer.Interfaces.Registrations.Fluent;
{
/// <summary> /// <summary>
/// Provides a <see cref="WithFactory{TFactory}"/> method to an <see cref="IRegistrationBase"/> /// Provides a <see cref="WithFactory{TFactory}"/> method to an <see cref="IRegistrationBase"/>
/// </summary> /// </summary>
@ -34,4 +34,3 @@ namespace LightweightIocContainer.Interfaces.Registrations.Fluent
/// </summary> /// </summary>
ITypedFactory? Factory { get; } ITypedFactory? Factory { get; }
} }
}

@ -6,8 +6,8 @@ using System;
using LightweightIocContainer.Exceptions; using LightweightIocContainer.Exceptions;
using LightweightIocContainer.Interfaces.Installers; using LightweightIocContainer.Interfaces.Installers;
namespace LightweightIocContainer.Interfaces.Registrations.Fluent namespace LightweightIocContainer.Interfaces.Registrations.Fluent;
{
/// <summary> /// <summary>
/// Provides a <see cref="WithParameters(object[])"/> method to an <see cref="IRegistration"/> /// Provides a <see cref="WithParameters(object[])"/> method to an <see cref="IRegistration"/>
/// </summary> /// </summary>
@ -40,4 +40,3 @@ namespace LightweightIocContainer.Interfaces.Registrations.Fluent
/// </summary> /// </summary>
object[]? Parameters { get; } object[]? Parameters { get; }
} }
}

@ -2,8 +2,8 @@
// // Created: 2020-01-29 // // Created: 2020-01-29
// // Copyright(c) 2020 SimonG. All Rights Reserved. // // Copyright(c) 2020 SimonG. All Rights Reserved.
namespace LightweightIocContainer.Interfaces.Registrations namespace LightweightIocContainer.Interfaces.Registrations;
{
/// <summary> /// <summary>
/// Provides a <see cref="LightweightIocContainer.Lifestyle"/> to an <see cref="IRegistration"/> /// Provides a <see cref="LightweightIocContainer.Lifestyle"/> to an <see cref="IRegistration"/>
/// </summary> /// </summary>
@ -14,4 +14,3 @@ namespace LightweightIocContainer.Interfaces.Registrations
/// </summary> /// </summary>
Lifestyle Lifestyle { get; } Lifestyle Lifestyle { get; }
} }
}

@ -2,8 +2,8 @@
// Created: 2020-11-19 // Created: 2020-11-19
// Copyright(c) 2020 SimonG. All Rights Reserved. // Copyright(c) 2020 SimonG. All Rights Reserved.
namespace LightweightIocContainer.Interfaces.Registrations namespace LightweightIocContainer.Interfaces.Registrations;
{
/// <summary> /// <summary>
/// An <see cref="IRegistration"/> to register multiple interfaces for on implementation type that implements them as a multiton /// An <see cref="IRegistration"/> to register multiple interfaces for on implementation type that implements them as a multiton
/// </summary> /// </summary>
@ -14,4 +14,3 @@ namespace LightweightIocContainer.Interfaces.Registrations
{ {
} }
}

@ -4,8 +4,8 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace LightweightIocContainer.Interfaces.Registrations namespace LightweightIocContainer.Interfaces.Registrations;
{
/// <summary> /// <summary>
/// The base interface for every <see cref="IMultipleRegistration{TInterface1,TInterface2,TImplementation}"/> to register multiple interfaces /// The base interface for every <see cref="IMultipleRegistration{TInterface1,TInterface2,TImplementation}"/> to register multiple interfaces
/// </summary> /// </summary>
@ -68,4 +68,3 @@ namespace LightweightIocContainer.Interfaces.Registrations
{ {
} }
}

@ -4,8 +4,8 @@
using System; using System;
namespace LightweightIocContainer.Interfaces.Registrations namespace LightweightIocContainer.Interfaces.Registrations;
{
/// <summary> /// <summary>
/// Non generic <see cref="IMultipleRegistration{TInterface1,TImplementation}"/> /// Non generic <see cref="IMultipleRegistration{TInterface1,TImplementation}"/>
/// </summary> /// </summary>
@ -26,4 +26,3 @@ namespace LightweightIocContainer.Interfaces.Registrations
{ {
} }
}

@ -2,8 +2,8 @@
// Created: 2020-09-18 // Created: 2020-09-18
// Copyright(c) 2020 SimonG. All Rights Reserved. // Copyright(c) 2020 SimonG. All Rights Reserved.
namespace LightweightIocContainer.Interfaces.Registrations namespace LightweightIocContainer.Interfaces.Registrations;
{
/// <summary> /// <summary>
/// <see cref="IRegistration"/> for open generic types /// <see cref="IRegistration"/> for open generic types
/// </summary> /// </summary>
@ -11,4 +11,3 @@ namespace LightweightIocContainer.Interfaces.Registrations
{ {
} }
}

@ -4,8 +4,8 @@
using System; using System;
namespace LightweightIocContainer.Interfaces.Registrations namespace LightweightIocContainer.Interfaces.Registrations;
{
/// <summary> /// <summary>
/// The base registration that is used to register an Interface /// The base registration that is used to register an Interface
/// </summary> /// </summary>
@ -16,4 +16,3 @@ namespace LightweightIocContainer.Interfaces.Registrations
/// </summary> /// </summary>
Type InterfaceType { get; } Type InterfaceType { get; }
} }
}

@ -4,8 +4,8 @@
using LightweightIocContainer.Interfaces.Registrations.Fluent; using LightweightIocContainer.Interfaces.Registrations.Fluent;
namespace LightweightIocContainer.Interfaces.Registrations namespace LightweightIocContainer.Interfaces.Registrations;
{
/// <summary> /// <summary>
/// The <see cref="IRegistrationBase"/> that is used to register an Interface and extends the <see cref="IRegistration"/> with fluent options /// The <see cref="IRegistrationBase"/> that is used to register an Interface and extends the <see cref="IRegistration"/> with fluent options
/// </summary> /// </summary>
@ -13,4 +13,3 @@ namespace LightweightIocContainer.Interfaces.Registrations
{ {
} }
}

@ -4,8 +4,8 @@
using System; using System;
namespace LightweightIocContainer.Interfaces.Registrations namespace LightweightIocContainer.Interfaces.Registrations;
{
/// <summary> /// <summary>
/// The <see cref="IRegistration"/> to register either only an interface or only a <see cref="Type"/> /// The <see cref="IRegistration"/> to register either only an interface or only a <see cref="Type"/>
/// </summary> /// </summary>
@ -24,4 +24,3 @@ namespace LightweightIocContainer.Interfaces.Registrations
/// <returns>The current instance of this <see cref="IRegistration"/></returns> /// <returns>The current instance of this <see cref="IRegistration"/></returns>
ISingleTypeRegistration<T> WithFactoryMethod(Func<IIocResolver, T> factoryMethod); ISingleTypeRegistration<T> WithFactoryMethod(Func<IIocResolver, T> factoryMethod);
} }
}

@ -4,8 +4,8 @@
using LightweightIocContainer.Interfaces.Factories; using LightweightIocContainer.Interfaces.Factories;
namespace LightweightIocContainer.Interfaces.Registrations namespace LightweightIocContainer.Interfaces.Registrations;
{
/// <summary> /// <summary>
/// The registration that is used to register an abstract typed factory /// The registration that is used to register an abstract typed factory
/// </summary> /// </summary>
@ -17,4 +17,3 @@ namespace LightweightIocContainer.Interfaces.Registrations
/// </summary> /// </summary>
ITypedFactory<TFactory> Factory { get; } ITypedFactory<TFactory> Factory { get; }
} }
}

@ -5,8 +5,8 @@
using System; using System;
using LightweightIocContainer.Interfaces.Registrations.Fluent; using LightweightIocContainer.Interfaces.Registrations.Fluent;
namespace LightweightIocContainer.Interfaces.Registrations namespace LightweightIocContainer.Interfaces.Registrations;
{
/// <summary> /// <summary>
/// A base <see cref="ITypedRegistration"/> without generic interface and implementation /// A base <see cref="ITypedRegistration"/> without generic interface and implementation
/// </summary> /// </summary>
@ -25,4 +25,3 @@ namespace LightweightIocContainer.Interfaces.Registrations
{ {
} }
}

@ -16,8 +16,8 @@ using LightweightIocContainer.Interfaces.Registrations.Fluent;
using LightweightIocContainer.Registrations; using LightweightIocContainer.Registrations;
using LightweightIocContainer.ResolvePlaceholders; using LightweightIocContainer.ResolvePlaceholders;
namespace LightweightIocContainer namespace LightweightIocContainer;
{
/// <summary> /// <summary>
/// The main container that carries all the <see cref="IRegistration"/>s and can resolve all the types you'll ever want /// The main container that carries all the <see cref="IRegistration"/>s and can resolve all the types you'll ever want
/// </summary> /// </summary>
@ -663,4 +663,3 @@ namespace LightweightIocContainer
_multitons.Clear(); _multitons.Clear();
} }
} }
}

@ -4,8 +4,8 @@
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer namespace LightweightIocContainer;
{
/// <summary> /// <summary>
/// The Lifestyles that can be used for a <see cref="IRegistrationBase"/> /// The Lifestyles that can be used for a <see cref="IRegistrationBase"/>
/// </summary> /// </summary>
@ -26,4 +26,3 @@ namespace LightweightIocContainer
/// </summary> /// </summary>
Multiton Multiton
} }
}

@ -7,8 +7,8 @@ using System.Collections.Generic;
using LightweightIocContainer.Interfaces; using LightweightIocContainer.Interfaces;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Registrations namespace LightweightIocContainer.Registrations;
{
/// <summary> /// <summary>
/// An <see cref="IRegistrationBase"/> to register multiple interfaces for on implementation type that implements them as a multiton /// An <see cref="IRegistrationBase"/> to register multiple interfaces for on implementation type that implements them as a multiton
/// </summary> /// </summary>
@ -58,4 +58,3 @@ namespace LightweightIocContainer.Registrations
return this; return this;
} }
} }
}

@ -7,8 +7,8 @@ using System.Collections.Generic;
using LightweightIocContainer.Interfaces; using LightweightIocContainer.Interfaces;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Registrations namespace LightweightIocContainer.Registrations;
{
/// <summary> /// <summary>
/// The base class for every <see cref="IMultipleRegistration{TInterface1,TInterface2, TImplementation}"/> to register multiple interfaces /// The base class for every <see cref="IMultipleRegistration{TInterface1,TInterface2, TImplementation}"/> to register multiple interfaces
/// </summary> /// </summary>
@ -242,4 +242,3 @@ namespace LightweightIocContainer.Registrations
return this; return this;
} }
} }
}

@ -8,8 +8,8 @@ using LightweightIocContainer.Exceptions;
using LightweightIocContainer.Interfaces; using LightweightIocContainer.Interfaces;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Registrations namespace LightweightIocContainer.Registrations;
{
/// <summary> /// <summary>
/// The registration that is used to register a multiton /// The registration that is used to register a multiton
/// </summary> /// </summary>
@ -56,4 +56,3 @@ namespace LightweightIocContainer.Registrations
public override int GetHashCode() => HashCode.Combine(base.GetHashCode(), Scope); public override int GetHashCode() => HashCode.Combine(base.GetHashCode(), Scope);
} }
}

@ -7,8 +7,8 @@ using LightweightIocContainer.Exceptions;
using LightweightIocContainer.Interfaces; using LightweightIocContainer.Interfaces;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Registrations namespace LightweightIocContainer.Registrations;
{
/// <summary> /// <summary>
/// <see cref="IRegistration"/> for open generic types /// <see cref="IRegistration"/> for open generic types
/// </summary> /// </summary>
@ -50,4 +50,3 @@ namespace LightweightIocContainer.Registrations
public override int GetHashCode() => HashCode.Combine(base.GetHashCode(), ImplementationType); public override int GetHashCode() => HashCode.Combine(base.GetHashCode(), ImplementationType);
} }
}

@ -12,8 +12,8 @@ using LightweightIocContainer.Interfaces.Registrations;
using LightweightIocContainer.Interfaces.Registrations.Fluent; using LightweightIocContainer.Interfaces.Registrations.Fluent;
using LightweightIocContainer.ResolvePlaceholders; using LightweightIocContainer.ResolvePlaceholders;
namespace LightweightIocContainer.Registrations namespace LightweightIocContainer.Registrations;
{
/// <summary> /// <summary>
/// The <see cref="RegistrationBase"/> that is used to register an Interface /// The <see cref="RegistrationBase"/> that is used to register an Interface
/// </summary> /// </summary>
@ -244,4 +244,3 @@ namespace LightweightIocContainer.Registrations
public override int GetHashCode() => HashCode.Combine(InterfaceType, (int) Lifestyle); public override int GetHashCode() => HashCode.Combine(InterfaceType, (int) Lifestyle);
} }
}

@ -7,8 +7,8 @@ using LightweightIocContainer.Interfaces.Factories;
using LightweightIocContainer.Interfaces.Installers; using LightweightIocContainer.Interfaces.Installers;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Registrations namespace LightweightIocContainer.Registrations;
{
/// <summary> /// <summary>
/// A factory to register interfaces and factories in an <see cref="IIocInstaller"/> and create the needed <see cref="IRegistration"/>s /// A factory to register interfaces and factories in an <see cref="IIocInstaller"/> and create the needed <see cref="IRegistration"/>s
/// </summary> /// </summary>
@ -124,4 +124,3 @@ namespace LightweightIocContainer.Registrations
/// <returns>A new created <see cref="ITypedFactoryRegistration{TFactory}"/> with the given parameters</returns> /// <returns>A new created <see cref="ITypedFactoryRegistration{TFactory}"/> with the given parameters</returns>
public ITypedFactoryRegistration<TFactory> RegisterFactory<TFactory>(ITypedFactory<TFactory> factory) => new TypedFactoryRegistration<TFactory>(factory); public ITypedFactoryRegistration<TFactory> RegisterFactory<TFactory>(ITypedFactory<TFactory> factory) => new TypedFactoryRegistration<TFactory>(factory);
} }
}

@ -6,8 +6,8 @@ using System;
using LightweightIocContainer.Interfaces; using LightweightIocContainer.Interfaces;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Registrations namespace LightweightIocContainer.Registrations;
{
/// <summary> /// <summary>
/// The <see cref="IRegistration"/> to register either only an interface or only a <see cref="Type"/> /// The <see cref="IRegistration"/> to register either only an interface or only a <see cref="Type"/>
/// </summary> /// </summary>
@ -58,4 +58,3 @@ namespace LightweightIocContainer.Registrations
public override int GetHashCode() => base.GetHashCode(); public override int GetHashCode() => base.GetHashCode();
} }
}

@ -6,8 +6,8 @@ using System;
using LightweightIocContainer.Interfaces.Factories; using LightweightIocContainer.Interfaces.Factories;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Registrations namespace LightweightIocContainer.Registrations;
{
/// <summary> /// <summary>
/// The registration that is used to register an abstract typed factory /// The registration that is used to register an abstract typed factory
/// </summary> /// </summary>
@ -36,4 +36,3 @@ namespace LightweightIocContainer.Registrations
public override int GetHashCode() => HashCode.Combine(InterfaceType); public override int GetHashCode() => HashCode.Combine(InterfaceType);
} }
}

@ -8,8 +8,8 @@ using LightweightIocContainer.Interfaces.Installers;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
using LightweightIocContainer.Interfaces.Registrations.Fluent; using LightweightIocContainer.Interfaces.Registrations.Fluent;
namespace LightweightIocContainer.Registrations namespace LightweightIocContainer.Registrations;
{
/// <summary> /// <summary>
/// A <see cref="IRegistrationBase"/> that implements a <see cref="Type"/> /// A <see cref="IRegistrationBase"/> that implements a <see cref="Type"/>
/// </summary> /// </summary>
@ -78,4 +78,3 @@ namespace LightweightIocContainer.Registrations
public override int GetHashCode() => HashCode.Combine(base.GetHashCode(), ImplementationType); public override int GetHashCode() => HashCode.Combine(base.GetHashCode(), ImplementationType);
} }
}

@ -2,8 +2,8 @@
// Created: 2019-11-22 // Created: 2019-11-22
// Copyright(c) 2019 SimonG. All Rights Reserved. // Copyright(c) 2019 SimonG. All Rights Reserved.
namespace LightweightIocContainer.ResolvePlaceholders namespace LightweightIocContainer.ResolvePlaceholders;
{
/// <summary> /// <summary>
/// An internal placeholder that is used during the resolving process /// An internal placeholder that is used during the resolving process
/// </summary> /// </summary>
@ -11,4 +11,3 @@ namespace LightweightIocContainer.ResolvePlaceholders
{ {
} }
}

@ -6,8 +6,8 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.ResolvePlaceholders namespace LightweightIocContainer.ResolvePlaceholders;
{
/// <summary> /// <summary>
/// An internal placeholder that is used to hold types that need to be resolved during the resolving process /// An internal placeholder that is used to hold types that need to be resolved during the resolving process
/// </summary> /// </summary>
@ -35,4 +35,3 @@ namespace LightweightIocContainer.ResolvePlaceholders
/// </summary> /// </summary>
public List<object?>? Parameters { get; } public List<object?>? Parameters { get; }
} }
}

@ -4,8 +4,8 @@
using System; using System;
namespace LightweightIocContainer namespace LightweightIocContainer;
{
internal static class TypeExtension internal static class TypeExtension
{ {
/// <summary> /// <summary>
@ -15,4 +15,3 @@ namespace LightweightIocContainer
/// <returns>The default value for the given <see cref="Type"/></returns> /// <returns>The default value for the given <see cref="Type"/></returns>
public static object? GetDefault(this Type type) => type.IsValueType ? Activator.CreateInstance(type) : null; public static object? GetDefault(this Type type) => type.IsValueType ? Activator.CreateInstance(type) : null;
} }
}

@ -9,8 +9,8 @@ using LightweightIocContainer.Interfaces.Registrations;
using LightweightIocContainer.Interfaces.Registrations.Fluent; using LightweightIocContainer.Interfaces.Registrations.Fluent;
using Moq; using Moq;
namespace LightweightIocContainer.Validation namespace LightweightIocContainer.Validation;
{
/// <summary> /// <summary>
/// Validator for your <see cref="IocContainer"/> to check if everything can be resolved with your current setup /// Validator for your <see cref="IocContainer"/> to check if everything can be resolved with your current setup
/// </summary> /// </summary>
@ -103,4 +103,3 @@ namespace LightweightIocContainer.Validation
} }
} }
} }
}

@ -6,8 +6,8 @@ using System;
using LightweightIocContainer; using LightweightIocContainer;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class ActionExtensionTest public class ActionExtensionTest
{ {
@ -43,4 +43,3 @@ namespace Test.LightweightIocContainer
Assert.Null(barAction.Convert<IFoo, IBar>()); Assert.Null(barAction.Convert<IFoo, IBar>());
} }
} }
}

@ -14,8 +14,8 @@ using LightweightIocContainer.Interfaces.Registrations;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class AssemblyInstallerTest public class AssemblyInstallerTest
{ {
@ -75,4 +75,3 @@ namespace Test.LightweightIocContainer
iocContainer.Install(FromAssembly.Instance(assemblyMock.Object)); iocContainer.Install(FromAssembly.Instance(assemblyMock.Object));
} }
} }
}

@ -9,8 +9,8 @@ using LightweightIocContainer;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class EnumerableExtensionTest public class EnumerableExtensionTest
{ {
@ -99,4 +99,3 @@ namespace Test.LightweightIocContainer
test4.Verify(t => t.DoSomething(), Times.Once); test4.Verify(t => t.DoSomething(), Times.Once);
} }
} }
}

@ -7,8 +7,8 @@ using LightweightIocContainer;
using LightweightIocContainer.Exceptions; using LightweightIocContainer.Exceptions;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class FluentFactoryRegistrationTest public class FluentFactoryRegistrationTest
{ {
@ -270,4 +270,3 @@ namespace Test.LightweightIocContainer
public void TestInvalidCreateMethodReturnType() => public void TestInvalidCreateMethodReturnType() =>
Assert.Throws<InvalidFactoryRegistrationException>(() => _iocContainer.Register(r => r.Add<ITest, Test>().WithFactory<ITestFactoryWrongReturn>())); Assert.Throws<InvalidFactoryRegistrationException>(() => _iocContainer.Register(r => r.Add<ITest, Test>().WithFactory<ITestFactoryWrongReturn>()));
} }
}

@ -7,8 +7,8 @@ using JetBrains.Annotations;
using LightweightIocContainer; using LightweightIocContainer;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class IocContainerInterfaceSegregationTest public class IocContainerInterfaceSegregationTest
{ {
@ -161,4 +161,3 @@ namespace Test.LightweightIocContainer
Assert.AreSame(foo, anotherOne); Assert.AreSame(foo, anotherOne);
} }
} }
}

@ -6,8 +6,8 @@ using JetBrains.Annotations;
using LightweightIocContainer; using LightweightIocContainer;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
// ReSharper disable MemberHidesStaticFromOuterClass // ReSharper disable MemberHidesStaticFromOuterClass
public class IocContainerParameterRegistrationTest public class IocContainerParameterRegistrationTest
@ -156,4 +156,3 @@ namespace Test.LightweightIocContainer
Assert.AreEqual(a2, d.A); Assert.AreEqual(a2, d.A);
} }
} }
}

@ -9,8 +9,8 @@ using LightweightIocContainer.Exceptions;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class IocContainerRecursionTest public class IocContainerRecursionTest
{ {
@ -163,4 +163,3 @@ namespace Test.LightweightIocContainer
Assert.DoesNotThrow(() => _iocContainer.Resolve<IB>()); Assert.DoesNotThrow(() => _iocContainer.Resolve<IB>());
} }
} }
}

@ -7,8 +7,8 @@ using LightweightIocContainer.Interfaces.Registrations;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class IocContainerTest public class IocContainerTest
{ {
@ -359,4 +359,3 @@ namespace Test.LightweightIocContainer
Assert.True(_iocContainer.IsTypeRegistered<Test>()); Assert.True(_iocContainer.IsTypeRegistered<Test>());
} }
} }
}

@ -12,8 +12,8 @@ using LightweightIocContainer.Validation;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class IocValidatorTest public class IocValidatorTest
{ {
@ -185,4 +185,3 @@ namespace Test.LightweightIocContainer
Assert.Fail($"Exception is no NoMatchingConstructorFoundException, actual type: {exception?.GetType()}"); Assert.Fail($"Exception is no NoMatchingConstructorFoundException, actual type: {exception?.GetType()}");
} }
} }
}

@ -6,8 +6,8 @@ using JetBrains.Annotations;
using LightweightIocContainer; using LightweightIocContainer;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class MultipleMultitonRegistrationTest public class MultipleMultitonRegistrationTest
{ {
@ -98,4 +98,3 @@ namespace Test.LightweightIocContainer
Assert.AreSame(test, provider); Assert.AreSame(test, provider);
} }
} }
}

@ -9,8 +9,8 @@ using LightweightIocContainer.Registrations;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class OnCreateTest public class OnCreateTest
{ {
@ -36,4 +36,3 @@ namespace Test.LightweightIocContainer
Assert.Throws<Exception>(() => testRegistration.OnCreateAction!(test)); Assert.Throws<Exception>(() => testRegistration.OnCreateAction!(test));
} }
} }
}

@ -8,8 +8,8 @@ using LightweightIocContainer;
using LightweightIocContainer.Exceptions; using LightweightIocContainer.Exceptions;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class OpenGenericRegistrationTest public class OpenGenericRegistrationTest
{ {
@ -66,4 +66,3 @@ namespace Test.LightweightIocContainer
public void TestRegisterNonOpenGenericTypeWithOpenGenericsFunctionThrowsException() => public void TestRegisterNonOpenGenericTypeWithOpenGenericsFunctionThrowsException() =>
Assert.Throws<InvalidRegistrationException>(() => _iocContainer.Register(r => r.AddOpenGenerics(typeof(int), typeof(int)))); Assert.Throws<InvalidRegistrationException>(() => _iocContainer.Register(r => r.AddOpenGenerics(typeof(int), typeof(int))));
} }
}

@ -10,8 +10,8 @@ using LightweightIocContainer.ResolvePlaceholders;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
public class RegistrationBaseTest public class RegistrationBaseTest
{ {
@ -96,4 +96,3 @@ namespace Test.LightweightIocContainer
Assert.Throws<InvalidRegistrationException>(() => registrationFactory.Register<IFoo, Foo>(Lifestyle.Transient).WithParameters(((int index, object parameter)[])null)); Assert.Throws<InvalidRegistrationException>(() => registrationFactory.Register<IFoo, Foo>(Lifestyle.Transient).WithParameters(((int index, object parameter)[])null));
} }
} }
}

@ -9,8 +9,8 @@ using LightweightIocContainer.Registrations;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;
namespace Test.LightweightIocContainer namespace Test.LightweightIocContainer;
{
[TestFixture] [TestFixture]
// ReSharper disable MemberHidesStaticFromOuterClass // ReSharper disable MemberHidesStaticFromOuterClass
public class SingleTypeRegistrationTest public class SingleTypeRegistrationTest
@ -68,4 +68,3 @@ namespace Test.LightweightIocContainer
Assert.AreEqual(bar, foo.Bar); Assert.AreEqual(bar, foo.Bar);
} }
} }
}
Loading…
Cancel
Save