- refactoring of xml comments

pull/32/head
Simon Gockner 7 years ago
parent 19d4ebcff4
commit e1533140b2
  1. 5
      LightweightIocContainer/Exceptions/IllegalAbstractMethodCreationException.cs
  2. 4
      LightweightIocContainer/Exceptions/InternalResolveException.cs
  3. 4
      LightweightIocContainer/Exceptions/InvalidFactoryRegistrationException.cs
  4. 4
      LightweightIocContainer/Exceptions/InvalidRegistrationException.cs
  5. 8
      LightweightIocContainer/Exceptions/MultipleRegistrationException.cs
  6. 7
      LightweightIocContainer/Exceptions/MultitonResolveException.cs
  7. 8
      LightweightIocContainer/Exceptions/TypeNotRegisteredException.cs
  8. 4
      LightweightIocContainer/Exceptions/UnknownRegistrationException.cs
  9. 4
      LightweightIocContainer/Installers/AssemblyInstaller.cs
  10. 24
      LightweightIocContainer/Interfaces/IIocContainer.cs
  11. 2
      LightweightIocContainer/Interfaces/Installers/IAssemblyInstaller.cs
  12. 10
      LightweightIocContainer/Interfaces/Registrations/IDefaultRegistration.cs
  13. 2
      LightweightIocContainer/Interfaces/Registrations/IMultitonRegistration.cs
  14. 2
      LightweightIocContainer/Interfaces/Registrations/IRegistrationBase.cs
  15. 65
      LightweightIocContainer/IocContainer.cs
  16. 224
      LightweightIocContainer/LightweightIocContainer.xml
  17. 21
      LightweightIocContainer/Registrations/DefaultRegistration.cs
  18. 8
      LightweightIocContainer/Registrations/MultitonRegistration.cs
  19. 8
      LightweightIocContainer/Registrations/RegistrationFactory.cs
  20. 11
      LightweightIocContainer/Registrations/TypedFactoryRegistration.cs
  21. 1
      Test.LightweightIocContainer/IocContainerTest.cs

@ -12,6 +12,11 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public class IllegalAbstractMethodCreationException : Exception public class IllegalAbstractMethodCreationException : Exception
{ {
/// <summary>
/// The creation of the abstract method is illegal in its current state
/// </summary>
/// <param name="message">The exception message</param>
/// <param name="method">The method that is illegal to create</param>
public IllegalAbstractMethodCreationException(string message, MethodInfo method) public IllegalAbstractMethodCreationException(string message, MethodInfo method)
: base(message) : base(message)
{ {

@ -12,6 +12,10 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public class InternalResolveException : Exception public class InternalResolveException : Exception
{ {
/// <summary>
/// An internal Error happened while the <see cref="IIocContainer"/> tried to resolve an instance
/// </summary>
/// <param name="message">The exception message</param>
public InternalResolveException(string message) public InternalResolveException(string message)
: base(message) : base(message)
{ {

@ -9,6 +9,10 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public class InvalidFactoryRegistrationException : InvalidRegistrationException public class InvalidFactoryRegistrationException : InvalidRegistrationException
{ {
/// <summary>
/// The registration of a Factory is not valid
/// </summary>
/// <param name="message">The exception message</param>
public InvalidFactoryRegistrationException(string message) public InvalidFactoryRegistrationException(string message)
: base(message) : base(message)
{ {

@ -11,6 +11,10 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public class InvalidRegistrationException : Exception public class InvalidRegistrationException : Exception
{ {
/// <summary>
/// The registration is not valid
/// </summary>
/// <param name="message">The exception message</param>
public InvalidRegistrationException(string message) public InvalidRegistrationException(string message)
: base(message) : base(message)
{ {

@ -8,10 +8,14 @@ using LightweightIocContainer.Interfaces;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions
{ {
/// <summary> /// <summary>
/// The Type is already registered in this <see cref="IIocContainer"/> /// The <see cref="System.Type"/> is already registered in this <see cref="IIocContainer"/>
/// </summary> /// </summary>
public class MultipleRegistrationException : Exception public class MultipleRegistrationException : Exception
{ {
/// <summary>
/// The <see cref="System.Type"/> is already registered in this <see cref="IIocContainer"/>
/// </summary>
/// <param name="type">The <see cref="System.Type"/> that is already registered in this <see cref="IIocContainer"/></param>
public MultipleRegistrationException(Type type) public MultipleRegistrationException(Type type)
: base($"Type {type.Name} is already registered in this IocContainer.") : base($"Type {type.Name} is already registered in this IocContainer.")
{ {
@ -19,7 +23,7 @@ namespace LightweightIocContainer.Exceptions
} }
/// <summary> /// <summary>
/// The registered Type /// The registered <see cref="System.Type"/>
/// </summary> /// </summary>
public Type Type { get; } public Type Type { get; }
} }

@ -11,6 +11,11 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public class MultitonResolveException : InternalResolveException public class MultitonResolveException : InternalResolveException
{ {
/// <summary>
/// An error happened while trying to resolve a multiton
/// </summary>
/// <param name="message">The exception message</param>
/// <param name="type">The <see cref="System.Type"/> of the multiton that's responsible for the exception</param>
public MultitonResolveException(string message, Type type) public MultitonResolveException(string message, Type type)
: base(message) : base(message)
{ {
@ -18,7 +23,7 @@ namespace LightweightIocContainer.Exceptions
} }
/// <summary> /// <summary>
/// The type of the multiton that's responsible for the exception /// The <see cref="System.Type"/> of the multiton that's responsible for the exception
/// </summary> /// </summary>
public Type Type { get; } public Type Type { get; }
} }

@ -8,10 +8,14 @@ using LightweightIocContainer.Interfaces;
namespace LightweightIocContainer.Exceptions namespace LightweightIocContainer.Exceptions
{ {
/// <summary> /// <summary>
/// The Type is not registered in this <see cref="IIocContainer"/> /// The <see cref="System.Type"/> is not registered in this <see cref="IIocContainer"/>
/// </summary> /// </summary>
public class TypeNotRegisteredException : Exception public class TypeNotRegisteredException : Exception
{ {
/// <summary>
/// The <see cref="System.Type"/> is not registered in this <see cref="IIocContainer"/>
/// </summary>
/// <param name="type">The unregistered <see cref="System.Type"/></param>
public TypeNotRegisteredException(Type type) public TypeNotRegisteredException(Type type)
: base($"Type {type.Name} is not registered in this IocContainer.") : base($"Type {type.Name} is not registered in this IocContainer.")
{ {
@ -19,7 +23,7 @@ namespace LightweightIocContainer.Exceptions
} }
/// <summary> /// <summary>
/// The unregistered Type /// The unregistered <see cref="System.Type"/>
/// </summary> /// </summary>
public Type Type { get; } public Type Type { get; }
} }

@ -12,6 +12,10 @@ namespace LightweightIocContainer.Exceptions
/// </summary> /// </summary>
public class UnknownRegistrationException : Exception public class UnknownRegistrationException : Exception
{ {
/// <summary>
/// An unknown <see cref="IRegistrationBase"/> was used
/// </summary>
/// <param name="message">The exception message</param>
public UnknownRegistrationException(string message) public UnknownRegistrationException(string message)
: base(message) : base(message)
{ {

@ -15,6 +15,10 @@ namespace LightweightIocContainer.Installers
/// </summary> /// </summary>
public class AssemblyInstaller : IAssemblyInstaller public class AssemblyInstaller : IAssemblyInstaller
{ {
/// <summary>
/// An <see cref="IIocInstaller"/> that installs all <see cref="IIocInstaller"/>s for its given <see cref="Assembly"/>
/// </summary>
/// <param name="assembly">The <see cref="Assembly"/> from where the <see cref="IIocInstaller"/>s will be installed</param>
public AssemblyInstaller(Assembly assembly) public AssemblyInstaller(Assembly assembly)
{ {
Installers = new List<IIocInstaller>(); Installers = new List<IIocInstaller>();

@ -25,37 +25,37 @@ namespace LightweightIocContainer.Interfaces
/// Add the <see cref="IRegistrationBase"/> to the the <see cref="IIocContainer"/> /// Add the <see cref="IRegistrationBase"/> to the the <see cref="IIocContainer"/>
/// </summary> /// </summary>
/// <param name="registration">The given <see cref="IRegistrationBase"/></param> /// <param name="registration">The given <see cref="IRegistrationBase"/></param>
/// <exception cref="MultipleRegistrationException">The Type is already registered in this <see cref="IIocContainer"/></exception> /// <exception cref="MultipleRegistrationException">The <see cref="Type"/> is already registered in this <see cref="IIocContainer"/></exception>
void Register(IRegistrationBase registration); void Register(IRegistrationBase registration);
/// <summary> /// <summary>
/// Gets an instance of the given type /// Gets an instance of the given <see cref="Type"/>
/// </summary> /// </summary>
/// <typeparam name="T">The given type</typeparam> /// <typeparam name="T">The given <see cref="Type"/></typeparam>
/// <returns>An instance of the given type</returns> /// <returns>An instance of the given <see cref="Type"/></returns>
T Resolve<T>(); T Resolve<T>();
/// <summary> /// <summary>
/// Gets an instance of the given type /// Gets an instance of the given <see cref="Type"/>
/// </summary> /// </summary>
/// <typeparam name="T">The given type</typeparam> /// <typeparam name="T">The given <see cref="Type"/></typeparam>
/// <param name="arguments">The constructor arguments</param> /// <param name="arguments">The constructor arguments</param>
/// <returns>An instance of the given type</returns> /// <returns>An instance of the given <see cref="Type"/></returns>
T Resolve<T>(params object[] arguments); T Resolve<T>(params object[] arguments);
/// <summary> /// <summary>
/// Gets an instance of the given type /// Gets an instance of the given <see cref="Type"/>
/// </summary> /// </summary>
/// <param name="type">The given type</param> /// <param name="type">The given <see cref="Type"/></param>
/// <param name="arguments">The constructor arguments</param> /// <param name="arguments">The constructor arguments</param>
/// <returns>An instance of the given type</returns> /// <returns>An instance of the given <see cref="Type"/></returns>
/// <exception cref="InternalResolveException">Could not find function <see cref="IocContainer.ResolveInternal{T}"/></exception> /// <exception cref="InternalResolveException">Could not find function <see cref="IocContainer.ResolveInternal{T}"/></exception>
object Resolve(Type type, object[] arguments); object Resolve(Type type, object[] arguments);
/// <summary> /// <summary>
/// Clear the multiton instances of the given type from the registered multitons list /// Clear the multiton instances of the given <see cref="Type"/> from the registered multitons list
/// </summary> /// </summary>
/// <typeparam name="T">The Type to clear the multiton instances</typeparam> /// <typeparam name="T">The <see cref="Type"/> to clear the multiton instances</typeparam>
void ClearMultitonInstances<T>(); void ClearMultitonInstances<T>();
} }
} }

@ -13,7 +13,7 @@ namespace LightweightIocContainer.Interfaces.Installers
public interface IAssemblyInstaller : IIocInstaller public interface IAssemblyInstaller : IIocInstaller
{ {
/// <summary> /// <summary>
/// The <see cref="IIocInstaller"/>s of the Assembly that this <see cref="IAssemblyInstaller"/> is installing /// The <see cref="IIocInstaller"/>s of the <see cref="Assembly"/> that this <see cref="IAssemblyInstaller"/> is installing
/// </summary> /// </summary>
List<IIocInstaller> Installers { get; } List<IIocInstaller> Installers { get; }
} }

@ -8,13 +8,13 @@ using LightweightIocContainer.Interfaces.Installers;
namespace LightweightIocContainer.Interfaces.Registrations namespace LightweightIocContainer.Interfaces.Registrations
{ {
/// <summary> /// <summary>
/// The default registration that is used to register a Type for the Interface it implements /// The default registration that is used to register a <see cref="Type"/> for the Interface it implements
/// </summary> /// </summary>
/// <typeparam name="TInterface">The registered Interface</typeparam> /// <typeparam name="TInterface">The registered Interface</typeparam>
public interface IDefaultRegistration<TInterface> : IRegistrationBase public interface IDefaultRegistration<TInterface> : IRegistrationBase
{ {
/// <summary> /// <summary>
/// The Type that implements the <see cref="IRegistrationBase.InterfaceType"/> that is registered with this <see cref="IDefaultRegistration{TInterface}"/> /// The <see cref="Type"/> that implements the <see cref="IRegistrationBase.InterfaceType"/> that is registered with this <see cref="IDefaultRegistration{TInterface}"/>
/// </summary> /// </summary>
Type ImplementationType { get; } Type ImplementationType { get; }
@ -24,15 +24,15 @@ namespace LightweightIocContainer.Interfaces.Registrations
Lifestyle Lifestyle { get; } Lifestyle Lifestyle { get; }
/// <summary> /// <summary>
/// This action is invoked when an instance of this type is created. /// This <see cref="Action{T}"/> is invoked when an instance of this type is created.
/// <para>Can be set in the <see cref="IIocInstaller"/> by calling <see cref="OnCreate"/></para> /// <para>Can be set in the <see cref="IIocInstaller"/> by calling <see cref="OnCreate"/></para>
/// </summary> /// </summary>
Action<TInterface> OnCreateAction { get; } Action<TInterface> OnCreateAction { get; }
/// <summary> /// <summary>
/// Pass an action that will be invoked when an instance of this type is created /// Pass an <see cref="Action{T}"/> that will be invoked when an instance of this type is created
/// </summary> /// </summary>
/// <param name="action">The action</param> /// <param name="action">The <see cref="Action{T}"/></param>
/// <returns>The current instance of this <see cref="IDefaultRegistration{TInterface}"/></returns> /// <returns>The current instance of this <see cref="IDefaultRegistration{TInterface}"/></returns>
IDefaultRegistration<TInterface> OnCreate(Action<TInterface> action); IDefaultRegistration<TInterface> OnCreate(Action<TInterface> action);
} }

@ -13,7 +13,7 @@ namespace LightweightIocContainer.Interfaces.Registrations
public interface IMultitonRegistration<TInterface> : IDefaultRegistration<TInterface> public interface IMultitonRegistration<TInterface> : IDefaultRegistration<TInterface>
{ {
/// <summary> /// <summary>
/// The type of the multiton scope /// The <see cref="Type"/> of the multiton scope
/// </summary> /// </summary>
Type Scope { get; } Type Scope { get; }
} }

@ -17,7 +17,7 @@ namespace LightweightIocContainer.Interfaces.Registrations
string Name { get; } string Name { get; }
/// <summary> /// <summary>
/// The Type of the Interface that is registered with this <see cref="IRegistrationBase"/> /// The <see cref="Type"/> of the Interface that is registered with this <see cref="IRegistrationBase"/>
/// </summary> /// </summary>
Type InterfaceType { get; } Type InterfaceType { get; }
} }

@ -42,7 +42,7 @@ namespace LightweightIocContainer
/// Add the <see cref="IRegistrationBase"/> to the the <see cref="IocContainer"/> /// Add the <see cref="IRegistrationBase"/> to the the <see cref="IocContainer"/>
/// </summary> /// </summary>
/// <param name="registration">The given <see cref="IRegistrationBase"/></param> /// <param name="registration">The given <see cref="IRegistrationBase"/></param>
/// <exception cref="MultipleRegistrationException">The Type is already registered in this <see cref="IocContainer"/></exception> /// <exception cref="MultipleRegistrationException">The <see cref="Type"/> is already registered in this <see cref="IocContainer"/></exception>
public void Register(IRegistrationBase registration) public void Register(IRegistrationBase registration)
{ {
//if type is already registered //if type is already registered
@ -53,32 +53,32 @@ namespace LightweightIocContainer
} }
/// <summary> /// <summary>
/// Gets an instance of the given type /// Gets an instance of the given <see cref="Type"/>
/// </summary> /// </summary>
/// <typeparam name="T">The given type</typeparam> /// <typeparam name="T">The given <see cref="Type"/></typeparam>
/// <returns>An instance of the given type</returns> /// <returns>An instance of the given <see cref="Type"/></returns>
public T Resolve<T>() public T Resolve<T>()
{ {
return ResolveInternal<T>(null); return ResolveInternal<T>(null);
} }
/// <summary> /// <summary>
/// Gets an instance of the given type /// Gets an instance of the given <see cref="Type"/>
/// </summary> /// </summary>
/// <typeparam name="T">The given type</typeparam> /// <typeparam name="T">The given <see cref="Type"/></typeparam>
/// <param name="arguments">The constructor arguments</param> /// <param name="arguments">The constructor arguments</param>
/// <returns>An instance of the given type</returns> /// <returns>An instance of the given <see cref="Type"/></returns>
public T Resolve<T>(params object[] arguments) public T Resolve<T>(params object[] arguments)
{ {
return ResolveInternal<T>(arguments); return ResolveInternal<T>(arguments);
} }
/// <summary> /// <summary>
/// Gets an instance of the given type /// Gets an instance of the given <see cref="Type"/>
/// </summary> /// </summary>
/// <param name="type">The given type</param> /// <param name="type">The given <see cref="Type"/></param>
/// <param name="arguments">The constructor arguments</param> /// <param name="arguments">The constructor arguments</param>
/// <returns>An instance of the given type</returns> /// <returns>An instance of the given <see cref="Type"/></returns>
/// <exception cref="InternalResolveException">Could not find function <see cref="ResolveInternal{T}"/></exception> /// <exception cref="InternalResolveException">Could not find function <see cref="ResolveInternal{T}"/></exception>
public object Resolve(Type type, object[] arguments) public object Resolve(Type type, object[] arguments)
{ {
@ -92,13 +92,13 @@ namespace LightweightIocContainer
} }
/// <summary> /// <summary>
/// Gets an instance of a given registered type /// Gets an instance of a given registered <see cref="Type"/>
/// </summary> /// </summary>
/// <typeparam name="T">The registered type</typeparam> /// <typeparam name="T">The registered <see cref="Type"/></typeparam>
/// <param name="arguments">The constructor arguments</param> /// <param name="arguments">The constructor arguments</param>
/// <returns>An instance of the given registered type</returns> /// <returns>An instance of the given registered <see cref="Type"/></returns>
/// <exception cref="TypeNotRegisteredException">The given type is not registered in this <see cref="IocContainer"/></exception> /// <exception cref="TypeNotRegisteredException">The given <see cref="Type"/> is not registered in this <see cref="IocContainer"/></exception>
/// <exception cref="UnknownRegistrationException">The registration for the given type has an unknown type</exception> /// <exception cref="UnknownRegistrationException">The registration for the given <see cref="Type"/> has an unknown <see cref="Type"/></exception>
private T ResolveInternal<T>(params object[] arguments) private T ResolveInternal<T>(params object[] arguments)
{ {
IRegistrationBase registration = _registrations.FirstOrDefault(r => r.InterfaceType == typeof(T)); IRegistrationBase registration = _registrations.FirstOrDefault(r => r.InterfaceType == typeof(T));
@ -123,12 +123,12 @@ namespace LightweightIocContainer
} }
/// <summary> /// <summary>
/// Gets or creates a singleton instance of a given type /// Gets or creates a singleton instance of a given <see cref="Type"/>
/// </summary> /// </summary>
/// <typeparam name="T">The given type</typeparam> /// <typeparam name="T">The given <see cref="Type"/></typeparam>
/// <param name="registration">The registration of the given type</param> /// <param name="registration">The registration of the given <see cref="Type"/></param>
/// <param name="arguments">The arguments to resolve</param> /// <param name="arguments">The arguments to resolve</param>
/// <returns>An existing or newly created singleton instance of the given type</returns> /// <returns>An existing or newly created singleton instance of the given <see cref="Type"/></returns>
private T GetOrCreateSingletonInstance<T>(IDefaultRegistration<T> registration, params object[] arguments) private T GetOrCreateSingletonInstance<T>(IDefaultRegistration<T> registration, params object[] arguments)
{ {
//if a singleton instance exists return it //if a singleton instance exists return it
@ -144,12 +144,12 @@ namespace LightweightIocContainer
} }
/// <summary> /// <summary>
/// Gets or creates a multiton instance of a given type /// Gets or creates a multiton instance of a given <see cref="Type"/>
/// </summary> /// </summary>
/// <typeparam name="T">The given type</typeparam> /// <typeparam name="T">The given <see cref="Type"/></typeparam>
/// <param name="registration">The registration of the given type</param> /// <param name="registration">The registration of the given <see cref="Type"/></param>
/// <param name="arguments">The arguments to resolve</param> /// <param name="arguments">The arguments to resolve</param>
/// <returns>An existing or newly created multiton instance of the given type</returns> /// <returns>An existing or newly created multiton instance of the given <see cref="Type"/></returns>
/// <exception cref="MultitonResolveException">No arguments given</exception> /// <exception cref="MultitonResolveException">No arguments given</exception>
/// <exception cref="MultitonResolveException">Scope argument not given</exception> /// <exception cref="MultitonResolveException">Scope argument not given</exception>
private T GetOrCreateMultitonInstance<T>(IMultitonRegistration<T> registration, params object[] arguments) private T GetOrCreateMultitonInstance<T>(IMultitonRegistration<T> registration, params object[] arguments)
@ -182,12 +182,12 @@ namespace LightweightIocContainer
} }
/// <summary> /// <summary>
/// Creates an instance of a given type /// Creates an instance of a given <see cref="Type"/>
/// </summary> /// </summary>
/// <typeparam name="T">The given type</typeparam> /// <typeparam name="T">The given <see cref="Type"/></typeparam>
/// <param name="registration">The registration of the given type</param> /// <param name="registration">The registration of the given <see cref="Type"/></param>
/// <param name="arguments">The constructor arguments</param> /// <param name="arguments">The constructor arguments</param>
/// <returns>A newly created instance of the given type</returns> /// <returns>A newly created instance of the given <see cref="Type"/></returns>
private T CreateInstance<T>(IDefaultRegistration<T> registration, params object[] arguments) private T CreateInstance<T>(IDefaultRegistration<T> registration, params object[] arguments)
{ {
arguments = ResolveConstructorArguments(registration.ImplementationType, arguments); arguments = ResolveConstructorArguments(registration.ImplementationType, arguments);
@ -200,9 +200,9 @@ namespace LightweightIocContainer
/// <summary> /// <summary>
/// Resolve the missing constructor arguments /// Resolve the missing constructor arguments
/// </summary> /// </summary>
/// <param name="type">The type that will be created</param> /// <param name="type">The <see cref="Type"/> that will be created</param>
/// <param name="arguments">The existing arguments</param> /// <param name="arguments">The existing arguments</param>
/// <returns>An array of all needed constructor arguments to create <param name="type"></param></returns> /// <returns>An array of all needed constructor arguments to create the <see cref="Type"/></returns>
[CanBeNull] [CanBeNull]
private object[] ResolveConstructorArguments(Type type, object[] arguments) private object[] ResolveConstructorArguments(Type type, object[] arguments)
{ {
@ -266,9 +266,9 @@ namespace LightweightIocContainer
} }
/// <summary> /// <summary>
/// Clear the multiton instances of the given type from the registered multitons list /// Clear the multiton instances of the given <see cref="Type"/> from the registered multitons list
/// </summary> /// </summary>
/// <typeparam name="T">The Type to clear the multiton instances</typeparam> /// <typeparam name="T">The <see cref="Type"/> to clear the multiton instances</typeparam>
public void ClearMultitonInstances<T>() public void ClearMultitonInstances<T>()
{ {
var multitonInstance = _multitons.FirstOrDefault(m => m.type == typeof(T)); var multitonInstance = _multitons.FirstOrDefault(m => m.type == typeof(T));
@ -280,6 +280,9 @@ namespace LightweightIocContainer
_multitons.Remove(multitonInstance); _multitons.Remove(multitonInstance);
} }
/// <summary>
/// The <see cref="Dispose"/> method
/// </summary>
public void Dispose() public void Dispose()
{ {
_registrations.Clear(); _registrations.Clear();

@ -38,6 +38,13 @@
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>
</member> </member>
<member name="M:LightweightIocContainer.Exceptions.IllegalAbstractMethodCreationException.#ctor(System.String,System.Reflection.MethodInfo)">
<summary>
The creation of the abstract method is illegal in its current state
</summary>
<param name="message">The exception message</param>
<param name="method">The method that is illegal to create</param>
</member>
<member name="P:LightweightIocContainer.Exceptions.IllegalAbstractMethodCreationException.Method"> <member name="P:LightweightIocContainer.Exceptions.IllegalAbstractMethodCreationException.Method">
<summary> <summary>
The Method whose creation is illegal The Method whose creation is illegal
@ -48,24 +55,48 @@
An internal Error happened while the <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/> tried to resolve an instance An internal Error happened while the <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/> tried to resolve an instance
</summary> </summary>
</member> </member>
<member name="M:LightweightIocContainer.Exceptions.InternalResolveException.#ctor(System.String)">
<summary>
An internal Error happened while the <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/> tried to resolve an instance
</summary>
<param name="message">The exception message</param>
</member>
<member name="T:LightweightIocContainer.Exceptions.InvalidFactoryRegistrationException"> <member name="T:LightweightIocContainer.Exceptions.InvalidFactoryRegistrationException">
<summary> <summary>
The registration of a Factory is not valid The registration of a Factory is not valid
</summary> </summary>
</member> </member>
<member name="M:LightweightIocContainer.Exceptions.InvalidFactoryRegistrationException.#ctor(System.String)">
<summary>
The registration of a Factory is not valid
</summary>
<param name="message">The exception message</param>
</member>
<member name="T:LightweightIocContainer.Exceptions.InvalidRegistrationException"> <member name="T:LightweightIocContainer.Exceptions.InvalidRegistrationException">
<summary> <summary>
The registration is not valid The registration is not valid
</summary> </summary>
</member> </member>
<member name="M:LightweightIocContainer.Exceptions.InvalidRegistrationException.#ctor(System.String)">
<summary>
The registration is not valid
</summary>
<param name="message">The exception message</param>
</member>
<member name="T:LightweightIocContainer.Exceptions.MultipleRegistrationException"> <member name="T:LightweightIocContainer.Exceptions.MultipleRegistrationException">
<summary> <summary>
The Type is already registered in this <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/> The <see cref="T:System.Type"/> is already registered in this <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/>
</summary> </summary>
</member> </member>
<member name="M:LightweightIocContainer.Exceptions.MultipleRegistrationException.#ctor(System.Type)">
<summary>
The <see cref="T:System.Type"/> is already registered in this <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/>
</summary>
<param name="type">The <see cref="T:System.Type"/> that is already registered in this <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/></param>
</member>
<member name="P:LightweightIocContainer.Exceptions.MultipleRegistrationException.Type"> <member name="P:LightweightIocContainer.Exceptions.MultipleRegistrationException.Type">
<summary> <summary>
The registered Type The registered <see cref="T:System.Type"/>
</summary> </summary>
</member> </member>
<member name="T:LightweightIocContainer.Exceptions.MultitonResolveException"> <member name="T:LightweightIocContainer.Exceptions.MultitonResolveException">
@ -73,19 +104,32 @@
An error happened while trying to resolve a multiton An error happened while trying to resolve a multiton
</summary> </summary>
</member> </member>
<member name="M:LightweightIocContainer.Exceptions.MultitonResolveException.#ctor(System.String,System.Type)">
<summary>
An error happened while trying to resolve a multiton
</summary>
<param name="message">The exception message</param>
<param name="type">The <see cref="T:System.Type"/> of the multiton that's responsible for the exception</param>
</member>
<member name="P:LightweightIocContainer.Exceptions.MultitonResolveException.Type"> <member name="P:LightweightIocContainer.Exceptions.MultitonResolveException.Type">
<summary> <summary>
The type of the multiton that's responsible for the exception The <see cref="T:System.Type"/> of the multiton that's responsible for the exception
</summary> </summary>
</member> </member>
<member name="T:LightweightIocContainer.Exceptions.TypeNotRegisteredException"> <member name="T:LightweightIocContainer.Exceptions.TypeNotRegisteredException">
<summary> <summary>
The Type is not registered in this <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/> The <see cref="T:System.Type"/> is not registered in this <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/>
</summary>
</member>
<member name="M:LightweightIocContainer.Exceptions.TypeNotRegisteredException.#ctor(System.Type)">
<summary>
The <see cref="T:System.Type"/> is not registered in this <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/>
</summary> </summary>
<param name="type">The unregistered <see cref="T:System.Type"/></param>
</member> </member>
<member name="P:LightweightIocContainer.Exceptions.TypeNotRegisteredException.Type"> <member name="P:LightweightIocContainer.Exceptions.TypeNotRegisteredException.Type">
<summary> <summary>
The unregistered Type The unregistered <see cref="T:System.Type"/>
</summary> </summary>
</member> </member>
<member name="T:LightweightIocContainer.Exceptions.UnknownRegistrationException"> <member name="T:LightweightIocContainer.Exceptions.UnknownRegistrationException">
@ -93,6 +137,12 @@
An unknown <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/> was used An unknown <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/> was used
</summary> </summary>
</member> </member>
<member name="M:LightweightIocContainer.Exceptions.UnknownRegistrationException.#ctor(System.String)">
<summary>
An unknown <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/> was used
</summary>
<param name="message">The exception message</param>
</member>
<member name="T:LightweightIocContainer.Factories.TypedFactory`1"> <member name="T:LightweightIocContainer.Factories.TypedFactory`1">
<summary> <summary>
Class to help implement an abstract typed factory Class to help implement an abstract typed factory
@ -109,6 +159,12 @@
An <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/> that installs all <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/>s for its given <see cref="T:System.Reflection.Assembly"/> An <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/> that installs all <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/>s for its given <see cref="T:System.Reflection.Assembly"/>
</summary> </summary>
</member> </member>
<member name="M:LightweightIocContainer.Installers.AssemblyInstaller.#ctor(System.Reflection.Assembly)">
<summary>
An <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/> that installs all <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/>s for its given <see cref="T:System.Reflection.Assembly"/>
</summary>
<param name="assembly">The <see cref="T:System.Reflection.Assembly"/> from where the <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/>s will be installed</param>
</member>
<member name="P:LightweightIocContainer.Installers.AssemblyInstaller.Installers"> <member name="P:LightweightIocContainer.Installers.AssemblyInstaller.Installers">
<summary> <summary>
The <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/>s of the Assembly that this <see cref="T:LightweightIocContainer.Installers.AssemblyInstaller"/> is installing The <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/>s of the Assembly that this <see cref="T:LightweightIocContainer.Installers.AssemblyInstaller"/> is installing
@ -166,37 +222,37 @@
Add the <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/> to the the <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/> Add the <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/> to the the <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/>
</summary> </summary>
<param name="registration">The given <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/></param> <param name="registration">The given <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/></param>
<exception cref="T:LightweightIocContainer.Exceptions.MultipleRegistrationException">The Type is already registered in this <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/></exception> <exception cref="T:LightweightIocContainer.Exceptions.MultipleRegistrationException">The <see cref="T:System.Type"/> is already registered in this <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/></exception>
</member> </member>
<member name="M:LightweightIocContainer.Interfaces.IIocContainer.Resolve``1"> <member name="M:LightweightIocContainer.Interfaces.IIocContainer.Resolve``1">
<summary> <summary>
Gets an instance of the given type Gets an instance of the given <see cref="T:System.Type"/>
</summary> </summary>
<typeparam name="T">The given type</typeparam> <typeparam name="T">The given <see cref="T:System.Type"/></typeparam>
<returns>An instance of the given type</returns> <returns>An instance of the given <see cref="T:System.Type"/></returns>
</member> </member>
<member name="M:LightweightIocContainer.Interfaces.IIocContainer.Resolve``1(System.Object[])"> <member name="M:LightweightIocContainer.Interfaces.IIocContainer.Resolve``1(System.Object[])">
<summary> <summary>
Gets an instance of the given type Gets an instance of the given <see cref="T:System.Type"/>
</summary> </summary>
<typeparam name="T">The given type</typeparam> <typeparam name="T">The given <see cref="T:System.Type"/></typeparam>
<param name="arguments">The constructor arguments</param> <param name="arguments">The constructor arguments</param>
<returns>An instance of the given type</returns> <returns>An instance of the given <see cref="T:System.Type"/></returns>
</member> </member>
<member name="M:LightweightIocContainer.Interfaces.IIocContainer.Resolve(System.Type,System.Object[])"> <member name="M:LightweightIocContainer.Interfaces.IIocContainer.Resolve(System.Type,System.Object[])">
<summary> <summary>
Gets an instance of the given type Gets an instance of the given <see cref="T:System.Type"/>
</summary> </summary>
<param name="type">The given type</param> <param name="type">The given <see cref="T:System.Type"/></param>
<param name="arguments">The constructor arguments</param> <param name="arguments">The constructor arguments</param>
<returns>An instance of the given type</returns> <returns>An instance of the given <see cref="T:System.Type"/></returns>
<exception cref="T:LightweightIocContainer.Exceptions.InternalResolveException">Could not find function <see cref="M:LightweightIocContainer.IocContainer.ResolveInternal``1(System.Object[])"/></exception> <exception cref="T:LightweightIocContainer.Exceptions.InternalResolveException">Could not find function <see cref="M:LightweightIocContainer.IocContainer.ResolveInternal``1(System.Object[])"/></exception>
</member> </member>
<member name="M:LightweightIocContainer.Interfaces.IIocContainer.ClearMultitonInstances``1"> <member name="M:LightweightIocContainer.Interfaces.IIocContainer.ClearMultitonInstances``1">
<summary> <summary>
Clear the multiton instances of the given type from the registered multitons list Clear the multiton instances of the given <see cref="T:System.Type"/> from the registered multitons list
</summary> </summary>
<typeparam name="T">The Type to clear the multiton instances</typeparam> <typeparam name="T">The <see cref="T:System.Type"/> to clear the multiton instances</typeparam>
</member> </member>
<member name="T:LightweightIocContainer.Interfaces.Installers.IAssemblyInstaller"> <member name="T:LightweightIocContainer.Interfaces.Installers.IAssemblyInstaller">
<summary> <summary>
@ -205,7 +261,7 @@
</member> </member>
<member name="P:LightweightIocContainer.Interfaces.Installers.IAssemblyInstaller.Installers"> <member name="P:LightweightIocContainer.Interfaces.Installers.IAssemblyInstaller.Installers">
<summary> <summary>
The <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/>s of the Assembly that this <see cref="T:LightweightIocContainer.Interfaces.Installers.IAssemblyInstaller"/> is installing The <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/>s of the <see cref="T:System.Reflection.Assembly"/> that this <see cref="T:LightweightIocContainer.Interfaces.Installers.IAssemblyInstaller"/> is installing
</summary> </summary>
</member> </member>
<member name="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"> <member name="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller">
@ -221,13 +277,13 @@
</member> </member>
<member name="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"> <member name="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1">
<summary> <summary>
The default registration that is used to register a Type for the Interface it implements The default registration that is used to register a <see cref="T:System.Type"/> for the Interface it implements
</summary> </summary>
<typeparam name="TInterface">The registered Interface</typeparam> <typeparam name="TInterface">The registered Interface</typeparam>
</member> </member>
<member name="P:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1.ImplementationType"> <member name="P:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1.ImplementationType">
<summary> <summary>
The Type that implements the <see cref="P:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase.InterfaceType"/> that is registered with this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/> The <see cref="T:System.Type"/> that implements the <see cref="P:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase.InterfaceType"/> that is registered with this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/>
</summary> </summary>
</member> </member>
<member name="P:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1.Lifestyle"> <member name="P:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1.Lifestyle">
@ -237,15 +293,15 @@
</member> </member>
<member name="P:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1.OnCreateAction"> <member name="P:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1.OnCreateAction">
<summary> <summary>
This action is invoked when an instance of this type is created. This <see cref="T:System.Action`1"/> is invoked when an instance of this type is created.
<para>Can be set in the <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/> by calling <see cref="M:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1.OnCreate(System.Action{`0})"/></para> <para>Can be set in the <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/> by calling <see cref="M:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1.OnCreate(System.Action{`0})"/></para>
</summary> </summary>
</member> </member>
<member name="M:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1.OnCreate(System.Action{`0})"> <member name="M:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1.OnCreate(System.Action{`0})">
<summary> <summary>
Pass an action that will be invoked when an instance of this type is created Pass an <see cref="T:System.Action`1"/> that will be invoked when an instance of this type is created
</summary> </summary>
<param name="action">The action</param> <param name="action">The <see cref="T:System.Action`1"/></param>
<returns>The current instance of this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/></returns> <returns>The current instance of this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/></returns>
</member> </member>
<member name="T:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1"> <member name="T:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1">
@ -256,7 +312,7 @@
</member> </member>
<member name="P:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1.Scope"> <member name="P:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1.Scope">
<summary> <summary>
The type of the multiton scope The <see cref="T:System.Type"/> of the multiton scope
</summary> </summary>
</member> </member>
<member name="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"> <member name="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase">
@ -271,7 +327,7 @@
</member> </member>
<member name="P:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase.InterfaceType"> <member name="P:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase.InterfaceType">
<summary> <summary>
The Type of the Interface that is registered with this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/> The <see cref="T:System.Type"/> of the Interface that is registered with this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/>
</summary> </summary>
</member> </member>
<member name="T:LightweightIocContainer.Interfaces.Registrations.ITypedFactoryRegistration`1"> <member name="T:LightweightIocContainer.Interfaces.Registrations.ITypedFactoryRegistration`1">
@ -302,84 +358,89 @@
Add the <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/> to the the <see cref="T:LightweightIocContainer.IocContainer"/> Add the <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/> to the the <see cref="T:LightweightIocContainer.IocContainer"/>
</summary> </summary>
<param name="registration">The given <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/></param> <param name="registration">The given <see cref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase"/></param>
<exception cref="T:LightweightIocContainer.Exceptions.MultipleRegistrationException">The Type is already registered in this <see cref="T:LightweightIocContainer.IocContainer"/></exception> <exception cref="T:LightweightIocContainer.Exceptions.MultipleRegistrationException">The <see cref="T:System.Type"/> is already registered in this <see cref="T:LightweightIocContainer.IocContainer"/></exception>
</member> </member>
<member name="M:LightweightIocContainer.IocContainer.Resolve``1"> <member name="M:LightweightIocContainer.IocContainer.Resolve``1">
<summary> <summary>
Gets an instance of the given type Gets an instance of the given <see cref="T:System.Type"/>
</summary> </summary>
<typeparam name="T">The given type</typeparam> <typeparam name="T">The given <see cref="T:System.Type"/></typeparam>
<returns>An instance of the given type</returns> <returns>An instance of the given <see cref="T:System.Type"/></returns>
</member> </member>
<member name="M:LightweightIocContainer.IocContainer.Resolve``1(System.Object[])"> <member name="M:LightweightIocContainer.IocContainer.Resolve``1(System.Object[])">
<summary> <summary>
Gets an instance of the given type Gets an instance of the given <see cref="T:System.Type"/>
</summary> </summary>
<typeparam name="T">The given type</typeparam> <typeparam name="T">The given <see cref="T:System.Type"/></typeparam>
<param name="arguments">The constructor arguments</param> <param name="arguments">The constructor arguments</param>
<returns>An instance of the given type</returns> <returns>An instance of the given <see cref="T:System.Type"/></returns>
</member> </member>
<member name="M:LightweightIocContainer.IocContainer.Resolve(System.Type,System.Object[])"> <member name="M:LightweightIocContainer.IocContainer.Resolve(System.Type,System.Object[])">
<summary> <summary>
Gets an instance of the given type Gets an instance of the given <see cref="T:System.Type"/>
</summary> </summary>
<param name="type">The given type</param> <param name="type">The given <see cref="T:System.Type"/></param>
<param name="arguments">The constructor arguments</param> <param name="arguments">The constructor arguments</param>
<returns>An instance of the given type</returns> <returns>An instance of the given <see cref="T:System.Type"/></returns>
<exception cref="T:LightweightIocContainer.Exceptions.InternalResolveException">Could not find function <see cref="M:LightweightIocContainer.IocContainer.ResolveInternal``1(System.Object[])"/></exception> <exception cref="T:LightweightIocContainer.Exceptions.InternalResolveException">Could not find function <see cref="M:LightweightIocContainer.IocContainer.ResolveInternal``1(System.Object[])"/></exception>
</member> </member>
<member name="M:LightweightIocContainer.IocContainer.ResolveInternal``1(System.Object[])"> <member name="M:LightweightIocContainer.IocContainer.ResolveInternal``1(System.Object[])">
<summary> <summary>
Gets an instance of a given registered type Gets an instance of a given registered <see cref="T:System.Type"/>
</summary> </summary>
<typeparam name="T">The registered type</typeparam> <typeparam name="T">The registered <see cref="T:System.Type"/></typeparam>
<param name="arguments">The constructor arguments</param> <param name="arguments">The constructor arguments</param>
<returns>An instance of the given registered type</returns> <returns>An instance of the given registered <see cref="T:System.Type"/></returns>
<exception cref="T:LightweightIocContainer.Exceptions.TypeNotRegisteredException">The given type is not registered in this <see cref="T:LightweightIocContainer.IocContainer"/></exception> <exception cref="T:LightweightIocContainer.Exceptions.TypeNotRegisteredException">The given <see cref="T:System.Type"/> is not registered in this <see cref="T:LightweightIocContainer.IocContainer"/></exception>
<exception cref="T:LightweightIocContainer.Exceptions.UnknownRegistrationException">The registration for the given type has an unknown type</exception> <exception cref="T:LightweightIocContainer.Exceptions.UnknownRegistrationException">The registration for the given <see cref="T:System.Type"/> has an unknown <see cref="T:System.Type"/></exception>
</member> </member>
<member name="M:LightweightIocContainer.IocContainer.GetOrCreateSingletonInstance``1(LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration{``0},System.Object[])"> <member name="M:LightweightIocContainer.IocContainer.GetOrCreateSingletonInstance``1(LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration{``0},System.Object[])">
<summary> <summary>
Gets or creates a singleton instance of a given type Gets or creates a singleton instance of a given <see cref="T:System.Type"/>
</summary> </summary>
<typeparam name="T">The given type</typeparam> <typeparam name="T">The given <see cref="T:System.Type"/></typeparam>
<param name="registration">The registration of the given type</param> <param name="registration">The registration of the given <see cref="T:System.Type"/></param>
<param name="arguments">The arguments to resolve</param> <param name="arguments">The arguments to resolve</param>
<returns>An existing or newly created singleton instance of the given type</returns> <returns>An existing or newly created singleton instance of the given <see cref="T:System.Type"/></returns>
</member> </member>
<member name="M:LightweightIocContainer.IocContainer.GetOrCreateMultitonInstance``1(LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration{``0},System.Object[])"> <member name="M:LightweightIocContainer.IocContainer.GetOrCreateMultitonInstance``1(LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration{``0},System.Object[])">
<summary> <summary>
Gets or creates a multiton instance of a given type Gets or creates a multiton instance of a given <see cref="T:System.Type"/>
</summary> </summary>
<typeparam name="T">The given type</typeparam> <typeparam name="T">The given <see cref="T:System.Type"/></typeparam>
<param name="registration">The registration of the given type</param> <param name="registration">The registration of the given <see cref="T:System.Type"/></param>
<param name="arguments">The arguments to resolve</param> <param name="arguments">The arguments to resolve</param>
<returns>An existing or newly created multiton instance of the given type</returns> <returns>An existing or newly created multiton instance of the given <see cref="T:System.Type"/></returns>
<exception cref="T:LightweightIocContainer.Exceptions.MultitonResolveException">No arguments given</exception> <exception cref="T:LightweightIocContainer.Exceptions.MultitonResolveException">No arguments given</exception>
<exception cref="T:LightweightIocContainer.Exceptions.MultitonResolveException">Scope argument not given</exception> <exception cref="T:LightweightIocContainer.Exceptions.MultitonResolveException">Scope argument not given</exception>
</member> </member>
<member name="M:LightweightIocContainer.IocContainer.CreateInstance``1(LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration{``0},System.Object[])"> <member name="M:LightweightIocContainer.IocContainer.CreateInstance``1(LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration{``0},System.Object[])">
<summary> <summary>
Creates an instance of a given type Creates an instance of a given <see cref="T:System.Type"/>
</summary> </summary>
<typeparam name="T">The given type</typeparam> <typeparam name="T">The given <see cref="T:System.Type"/></typeparam>
<param name="registration">The registration of the given type</param> <param name="registration">The registration of the given <see cref="T:System.Type"/></param>
<param name="arguments">The constructor arguments</param> <param name="arguments">The constructor arguments</param>
<returns>A newly created instance of the given type</returns> <returns>A newly created instance of the given <see cref="T:System.Type"/></returns>
</member> </member>
<member name="M:LightweightIocContainer.IocContainer.ResolveConstructorArguments(System.Type,System.Object[])"> <member name="M:LightweightIocContainer.IocContainer.ResolveConstructorArguments(System.Type,System.Object[])">
<summary> <summary>
Resolve the missing constructor arguments Resolve the missing constructor arguments
</summary> </summary>
<param name="type">The type that will be created</param> <param name="type">The <see cref="T:System.Type"/> that will be created</param>
<param name="arguments">The existing arguments</param> <param name="arguments">The existing arguments</param>
<returns>An array of all needed constructor arguments to create <param name="type"></param></returns> <returns>An array of all needed constructor arguments to create the <see cref="T:System.Type"/></returns>
</member> </member>
<member name="M:LightweightIocContainer.IocContainer.ClearMultitonInstances``1"> <member name="M:LightweightIocContainer.IocContainer.ClearMultitonInstances``1">
<summary> <summary>
Clear the multiton instances of the given type from the registered multitons list Clear the multiton instances of the given <see cref="T:System.Type"/> from the registered multitons list
</summary>
<typeparam name="T">The <see cref="T:System.Type"/> to clear the multiton instances</typeparam>
</member>
<member name="M:LightweightIocContainer.IocContainer.Dispose">
<summary>
The <see cref="M:LightweightIocContainer.IocContainer.Dispose"/> method
</summary> </summary>
<typeparam name="T">The Type to clear the multiton instances</typeparam>
</member> </member>
<member name="T:LightweightIocContainer.IocContainer.InternalResolvePlaceholder"> <member name="T:LightweightIocContainer.IocContainer.InternalResolvePlaceholder">
<summary> <summary>
@ -408,10 +469,18 @@
</member> </member>
<member name="T:LightweightIocContainer.Registrations.DefaultRegistration`1"> <member name="T:LightweightIocContainer.Registrations.DefaultRegistration`1">
<summary> <summary>
The default registration that is used to register a Type for the Interface it implements The default registration that is used to register a <see cref="T:System.Type"/> for the Interface it implements
</summary> </summary>
<typeparam name="TInterface">The registered Interface</typeparam> <typeparam name="TInterface">The registered Interface</typeparam>
</member> </member>
<member name="M:LightweightIocContainer.Registrations.DefaultRegistration`1.#ctor(System.Type,System.Type,LightweightIocContainer.Lifestyle)">
<summary>
The default registration that is used to register a <see cref="T:System.Type"/> for the Interface it implements
</summary>
<param name="interfaceType">The <see cref="T:System.Type"/> of the Interface</param>
<param name="implementationType">The <see cref="T:System.Type"/> of the Implementation</param>
<param name="lifestyle">The <see cref="T:LightweightIocContainer.Lifestyle"/> of the registration</param>
</member>
<member name="P:LightweightIocContainer.Registrations.DefaultRegistration`1.Name"> <member name="P:LightweightIocContainer.Registrations.DefaultRegistration`1.Name">
<summary> <summary>
The name of the <see cref="T:LightweightIocContainer.Registrations.DefaultRegistration`1"/> The name of the <see cref="T:LightweightIocContainer.Registrations.DefaultRegistration`1"/>
@ -419,30 +488,30 @@
</member> </member>
<member name="P:LightweightIocContainer.Registrations.DefaultRegistration`1.InterfaceType"> <member name="P:LightweightIocContainer.Registrations.DefaultRegistration`1.InterfaceType">
<summary> <summary>
The Type of the Interface that is registered with this <see cref="T:LightweightIocContainer.Registrations.DefaultRegistration`1"/> The <see cref="T:System.Type"/> of the Interface that is registered with this <see cref="T:LightweightIocContainer.Registrations.DefaultRegistration`1"/>
</summary> </summary>
</member> </member>
<member name="P:LightweightIocContainer.Registrations.DefaultRegistration`1.ImplementationType"> <member name="P:LightweightIocContainer.Registrations.DefaultRegistration`1.ImplementationType">
<summary> <summary>
The Type that implements the <see cref="P:LightweightIocContainer.Registrations.DefaultRegistration`1.InterfaceType"/> that is registered with this <see cref="T:LightweightIocContainer.Registrations.DefaultRegistration`1"/> The <see cref="T:System.Type"/> that implements the <see cref="P:LightweightIocContainer.Registrations.DefaultRegistration`1.InterfaceType"/> that is registered with this <see cref="T:LightweightIocContainer.Registrations.DefaultRegistration`1"/>
</summary> </summary>
</member> </member>
<member name="P:LightweightIocContainer.Registrations.DefaultRegistration`1.Lifestyle"> <member name="P:LightweightIocContainer.Registrations.DefaultRegistration`1.Lifestyle">
<summary> <summary>
The Lifestyle of Instances that are created with this <see cref="T:LightweightIocContainer.Registrations.DefaultRegistration`1"/> The <see cref="T:LightweightIocContainer.Lifestyle"/> of Instances that are created with this <see cref="T:LightweightIocContainer.Registrations.DefaultRegistration`1"/>
</summary> </summary>
</member> </member>
<member name="P:LightweightIocContainer.Registrations.DefaultRegistration`1.OnCreateAction"> <member name="P:LightweightIocContainer.Registrations.DefaultRegistration`1.OnCreateAction">
<summary> <summary>
This action is invoked when an instance of this type is created. This <see cref="T:System.Action`1"/> is invoked when an instance of this type is created.
<para>Can be set in the <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/> by calling <see cref="M:LightweightIocContainer.Registrations.DefaultRegistration`1.OnCreate(System.Action{`0})"/></para> <para>Can be set in the <see cref="T:LightweightIocContainer.Interfaces.Installers.IIocInstaller"/> by calling <see cref="M:LightweightIocContainer.Registrations.DefaultRegistration`1.OnCreate(System.Action{`0})"/></para>
</summary> </summary>
</member> </member>
<member name="M:LightweightIocContainer.Registrations.DefaultRegistration`1.OnCreate(System.Action{`0})"> <member name="M:LightweightIocContainer.Registrations.DefaultRegistration`1.OnCreate(System.Action{`0})">
<summary> <summary>
Pass an action that will be invoked when an instance of this type is created Pass an <see cref="T:System.Action`1"/> that will be invoked when an instance of this <see cref="T:System.Type"/> is created
</summary> </summary>
<param name="action">The action</param> <param name="action">The <see cref="T:System.Action`1"/></param>
<returns>The current instance of this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/></returns> <returns>The current instance of this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/></returns>
</member> </member>
<member name="T:LightweightIocContainer.Registrations.MultitonRegistration`1"> <member name="T:LightweightIocContainer.Registrations.MultitonRegistration`1">
@ -451,9 +520,17 @@
</summary> </summary>
<typeparam name="TInterface">The registered interface</typeparam> <typeparam name="TInterface">The registered interface</typeparam>
</member> </member>
<member name="M:LightweightIocContainer.Registrations.MultitonRegistration`1.#ctor(System.Type,System.Type,System.Type)">
<summary>
The registration that is used to register a multiton
</summary>
<param name="interfaceType">The <see cref="T:System.Type"/> of the Interface</param>
<param name="implementationType">The <see cref="T:System.Type"/> of the Implementation</param>
<param name="scope">The <see cref="T:System.Type"/> of the Multiton Scope</param>
</member>
<member name="P:LightweightIocContainer.Registrations.MultitonRegistration`1.Scope"> <member name="P:LightweightIocContainer.Registrations.MultitonRegistration`1.Scope">
<summary> <summary>
The type of the multiton scope The <see cref="T:System.Type"/> of the multiton scope
</summary> </summary>
</member> </member>
<member name="T:LightweightIocContainer.Registrations.RegistrationFactory"> <member name="T:LightweightIocContainer.Registrations.RegistrationFactory">
@ -466,7 +543,7 @@
Register an Interface with a Type that implements it and create a <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/> Register an Interface with a Type that implements it and create a <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/>
</summary> </summary>
<typeparam name="TInterface">The Interface to register</typeparam> <typeparam name="TInterface">The Interface to register</typeparam>
<typeparam name="TImplementation">The Type that implements the <see cref="!:TInterface"/></typeparam> <typeparam name="TImplementation">The Type that implements the interface</typeparam>
<param name="lifestyle">The <see cref="T:LightweightIocContainer.Lifestyle"/> for this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/></param> <param name="lifestyle">The <see cref="T:LightweightIocContainer.Lifestyle"/> for this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/></param>
<returns>A new created <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/> with the given parameters</returns> <returns>A new created <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/> with the given parameters</returns>
</member> </member>
@ -475,7 +552,7 @@
Register an Interface with a Type that implements it as a multiton and create a <see cref="T:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1"/> Register an Interface with a Type that implements it as a multiton and create a <see cref="T:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1"/>
</summary> </summary>
<typeparam name="TInterface">The Interface to register</typeparam> <typeparam name="TInterface">The Interface to register</typeparam>
<typeparam name="TImplementation">The Type that implements the <see cref="!:TInterface"/></typeparam> <typeparam name="TImplementation">The Type that implements the interface</typeparam>
<typeparam name="TScope">The Type of the multiton scope</typeparam> <typeparam name="TScope">The Type of the multiton scope</typeparam>
<returns>A new created <see cref="T:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1"/> with the given parameters</returns> <returns>A new created <see cref="T:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1"/> with the given parameters</returns>
</member> </member>
@ -484,7 +561,7 @@
Register an Interface with a Type that implements it and create a <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/> Register an Interface with a Type that implements it and create a <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/>
</summary> </summary>
<param name="tInterface">The Interface to register</param> <param name="tInterface">The Interface to register</param>
<param name="tImplementation">The Type that implements the <see cref="!:tInterface"/></param> <param name="tImplementation">The Type that implements the interface</param>
<param name="lifestyle">The <see cref="T:LightweightIocContainer.Lifestyle"/> for this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/></param> <param name="lifestyle">The <see cref="T:LightweightIocContainer.Lifestyle"/> for this <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/></param>
<returns>A new created <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/> with the given parameters</returns> <returns>A new created <see cref="T:LightweightIocContainer.Interfaces.Registrations.IDefaultRegistration`1"/> with the given parameters</returns>
</member> </member>
@ -493,7 +570,7 @@
Register an Interface with a Type that implements it as a multiton and create a <see cref="T:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1"/> Register an Interface with a Type that implements it as a multiton and create a <see cref="T:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1"/>
</summary> </summary>
<param name="tInterface">The Interface to register</param> <param name="tInterface">The Interface to register</param>
<param name="tImplementation">The Type that implements the <see cref="!:tInterface"/></param> <param name="tImplementation">The Type that implements the interface</param>
<param name="tScope">The Type of the multiton scope</param> <param name="tScope">The Type of the multiton scope</param>
<returns>A new created <see cref="T:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1"/> with the given parameters</returns> <returns>A new created <see cref="T:LightweightIocContainer.Interfaces.Registrations.IMultitonRegistration`1"/> with the given parameters</returns>
</member> </member>
@ -517,7 +594,14 @@
<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>
<typeparam name="TFactory">The type of the abstract typed factory</typeparam> <typeparam name="TFactory">The <see cref="T:System.Type"/> of the abstract typed factory</typeparam>
</member>
<member name="M:LightweightIocContainer.Registrations.TypedFactoryRegistration`1.#ctor(System.Type,LightweightIocContainer.Interfaces.IIocContainer)">
<summary>
The registration that is used to register an abstract typed factory
</summary>
<param name="factoryType">The <see cref="T:System.Type"/> of the abstract typed factory</param>
<param name="container">The current instance of the <see cref="T:LightweightIocContainer.Interfaces.IIocContainer"/></param>
</member> </member>
<member name="P:LightweightIocContainer.Registrations.TypedFactoryRegistration`1.Name"> <member name="P:LightweightIocContainer.Registrations.TypedFactoryRegistration`1.Name">
<summary> <summary>
@ -526,7 +610,7 @@
</member> </member>
<member name="P:LightweightIocContainer.Registrations.TypedFactoryRegistration`1.InterfaceType"> <member name="P:LightweightIocContainer.Registrations.TypedFactoryRegistration`1.InterfaceType">
<summary> <summary>
The Type of the abstract typed factory that is registered with this <see cref="T:LightweightIocContainer.Registrations.TypedFactoryRegistration`1"/> The <see cref="T:System.Type"/> of the abstract typed factory that is registered with this <see cref="T:LightweightIocContainer.Registrations.TypedFactoryRegistration`1"/>
</summary> </summary>
</member> </member>
<member name="P:LightweightIocContainer.Registrations.TypedFactoryRegistration`1.Factory"> <member name="P:LightweightIocContainer.Registrations.TypedFactoryRegistration`1.Factory">

@ -3,18 +3,23 @@
// Copyright(c) 2019 SimonG. All Rights Reserved. // Copyright(c) 2019 SimonG. All Rights Reserved.
using System; using System;
using LightweightIocContainer.Interfaces;
using LightweightIocContainer.Interfaces.Installers; using LightweightIocContainer.Interfaces.Installers;
using LightweightIocContainer.Interfaces.Registrations; using LightweightIocContainer.Interfaces.Registrations;
namespace LightweightIocContainer.Registrations namespace LightweightIocContainer.Registrations
{ {
/// <summary> /// <summary>
/// The default registration that is used to register a Type for the Interface it implements /// The default registration that is used to register a <see cref="Type"/> for the Interface it implements
/// </summary> /// </summary>
/// <typeparam name="TInterface">The registered Interface</typeparam> /// <typeparam name="TInterface">The registered Interface</typeparam>
public class DefaultRegistration<TInterface> : IDefaultRegistration<TInterface> public class DefaultRegistration<TInterface> : IDefaultRegistration<TInterface>
{ {
/// <summary>
/// The default registration that is used to register a <see cref="Type"/> for the Interface it implements
/// </summary>
/// <param name="interfaceType">The <see cref="Type"/> of the Interface</param>
/// <param name="implementationType">The <see cref="Type"/> of the Implementation</param>
/// <param name="lifestyle">The <see cref="LightweightIocContainer.Lifestyle"/> of the registration</param>
public DefaultRegistration(Type interfaceType, Type implementationType, Lifestyle lifestyle) public DefaultRegistration(Type interfaceType, Type implementationType, Lifestyle lifestyle)
{ {
InterfaceType = interfaceType; InterfaceType = interfaceType;
@ -30,32 +35,32 @@ namespace LightweightIocContainer.Registrations
public string Name { get; } public string Name { get; }
/// <summary> /// <summary>
/// The Type of the Interface that is registered with this <see cref="DefaultRegistration{TInterface}"/> /// The <see cref="Type"/> of the Interface that is registered with this <see cref="DefaultRegistration{TInterface}"/>
/// </summary> /// </summary>
public Type InterfaceType { get; } public Type InterfaceType { get; }
/// <summary> /// <summary>
/// The Type that implements the <see cref="InterfaceType"/> that is registered with this <see cref="DefaultRegistration{TInterface}"/> /// The <see cref="Type"/> that implements the <see cref="InterfaceType"/> that is registered with this <see cref="DefaultRegistration{TInterface}"/>
/// </summary> /// </summary>
public Type ImplementationType { get; } public Type ImplementationType { get; }
/// <summary> /// <summary>
/// The Lifestyle of Instances that are created with this <see cref="DefaultRegistration{TInterface}"/> /// The <see cref="LightweightIocContainer.Lifestyle"/> of Instances that are created with this <see cref="DefaultRegistration{TInterface}"/>
/// </summary> /// </summary>
public Lifestyle Lifestyle { get; } public Lifestyle Lifestyle { get; }
/// <summary> /// <summary>
/// This action is invoked when an instance of this type is created. /// This <see cref="Action{T}"/> is invoked when an instance of this type is created.
/// <para>Can be set in the <see cref="IIocInstaller"/> by calling <see cref="OnCreate"/></para> /// <para>Can be set in the <see cref="IIocInstaller"/> by calling <see cref="OnCreate"/></para>
/// </summary> /// </summary>
public Action<TInterface> OnCreateAction { get; private set; } public Action<TInterface> OnCreateAction { get; private set; }
/// <summary> /// <summary>
/// Pass an action that will be invoked when an instance of this type is created /// Pass an <see cref="Action{T}"/> that will be invoked when an instance of this <see cref="Type"/> is created
/// </summary> /// </summary>
/// <param name="action">The action</param> /// <param name="action">The <see cref="Action{T}"/></param>
/// <returns>The current instance of this <see cref="IDefaultRegistration{TInterface}"/></returns> /// <returns>The current instance of this <see cref="IDefaultRegistration{TInterface}"/></returns>
public IDefaultRegistration<TInterface> OnCreate(Action<TInterface> action) public IDefaultRegistration<TInterface> OnCreate(Action<TInterface> action)
{ {

@ -13,6 +13,12 @@ namespace LightweightIocContainer.Registrations
/// <typeparam name="TInterface">The registered interface</typeparam> /// <typeparam name="TInterface">The registered interface</typeparam>
public class MultitonRegistration<TInterface> : DefaultRegistration<TInterface>, IMultitonRegistration<TInterface> public class MultitonRegistration<TInterface> : DefaultRegistration<TInterface>, IMultitonRegistration<TInterface>
{ {
/// <summary>
/// The registration that is used to register a multiton
/// </summary>
/// <param name="interfaceType">The <see cref="Type"/> of the Interface</param>
/// <param name="implementationType">The <see cref="Type"/> of the Implementation</param>
/// <param name="scope">The <see cref="Type"/> of the Multiton Scope</param>
public MultitonRegistration(Type interfaceType, Type implementationType, Type scope) public MultitonRegistration(Type interfaceType, Type implementationType, Type scope)
: base(interfaceType, implementationType, Lifestyle.Multiton) : base(interfaceType, implementationType, Lifestyle.Multiton)
{ {
@ -20,7 +26,7 @@ namespace LightweightIocContainer.Registrations
} }
/// <summary> /// <summary>
/// The type of the multiton scope /// The <see cref="Type"/> of the multiton scope
/// </summary> /// </summary>
public Type Scope { get; } public Type Scope { get; }
} }

@ -18,7 +18,7 @@ namespace LightweightIocContainer.Registrations
/// Register an Interface with a Type that implements it and create a <see cref="IDefaultRegistration{TInterface}"/> /// Register an Interface with a Type that implements it and create a <see cref="IDefaultRegistration{TInterface}"/>
/// </summary> /// </summary>
/// <typeparam name="TInterface">The Interface to register</typeparam> /// <typeparam name="TInterface">The Interface to register</typeparam>
/// <typeparam name="TImplementation">The Type that implements the <see cref="TInterface"/></typeparam> /// <typeparam name="TImplementation">The Type that implements the interface</typeparam>
/// <param name="lifestyle">The <see cref="Lifestyle"/> for this <see cref="IDefaultRegistration{TInterface}"/></param> /// <param name="lifestyle">The <see cref="Lifestyle"/> for this <see cref="IDefaultRegistration{TInterface}"/></param>
/// <returns>A new created <see cref="IDefaultRegistration{TInterface}"/> with the given parameters</returns> /// <returns>A new created <see cref="IDefaultRegistration{TInterface}"/> with the given parameters</returns>
public static IDefaultRegistration<TInterface> Register<TInterface, TImplementation>(Lifestyle lifestyle = Lifestyle.Transient) where TImplementation : TInterface public static IDefaultRegistration<TInterface> Register<TInterface, TImplementation>(Lifestyle lifestyle = Lifestyle.Transient) where TImplementation : TInterface
@ -30,7 +30,7 @@ namespace LightweightIocContainer.Registrations
/// Register an Interface with a Type that implements it as a multiton and create a <see cref="IMultitonRegistration{TInterface}"/> /// Register an Interface with a Type that implements it as a multiton and create a <see cref="IMultitonRegistration{TInterface}"/>
/// </summary> /// </summary>
/// <typeparam name="TInterface">The Interface to register</typeparam> /// <typeparam name="TInterface">The Interface to register</typeparam>
/// <typeparam name="TImplementation">The Type that implements the <see cref="TInterface"/></typeparam> /// <typeparam name="TImplementation">The Type that implements the interface</typeparam>
/// <typeparam name="TScope">The Type of the multiton scope</typeparam> /// <typeparam name="TScope">The Type of the multiton scope</typeparam>
/// <returns>A new created <see cref="IMultitonRegistration{TInterface}"/> with the given parameters</returns> /// <returns>A new created <see cref="IMultitonRegistration{TInterface}"/> with the given parameters</returns>
public static IMultitonRegistration<TInterface> Register<TInterface, TImplementation, TScope>() where TImplementation : TInterface public static IMultitonRegistration<TInterface> Register<TInterface, TImplementation, TScope>() where TImplementation : TInterface
@ -42,7 +42,7 @@ namespace LightweightIocContainer.Registrations
/// Register an Interface with a Type that implements it and create a <see cref="IDefaultRegistration{TInterface}"/> /// Register an Interface with a Type that implements it and create a <see cref="IDefaultRegistration{TInterface}"/>
/// </summary> /// </summary>
/// <param name="tInterface">The Interface to register</param> /// <param name="tInterface">The Interface to register</param>
/// <param name="tImplementation">The Type that implements the <see cref="tInterface"/></param> /// <param name="tImplementation">The Type that implements the interface</param>
/// <param name="lifestyle">The <see cref="Lifestyle"/> for this <see cref="IDefaultRegistration{TInterface}"/></param> /// <param name="lifestyle">The <see cref="Lifestyle"/> for this <see cref="IDefaultRegistration{TInterface}"/></param>
/// <returns>A new created <see cref="IDefaultRegistration{TInterface}"/> with the given parameters</returns> /// <returns>A new created <see cref="IDefaultRegistration{TInterface}"/> with the given parameters</returns>
public static IRegistrationBase Register(Type tInterface, Type tImplementation, Lifestyle lifestyle = Lifestyle.Transient) public static IRegistrationBase Register(Type tInterface, Type tImplementation, Lifestyle lifestyle = Lifestyle.Transient)
@ -55,7 +55,7 @@ namespace LightweightIocContainer.Registrations
/// Register an Interface with a Type that implements it as a multiton and create a <see cref="IMultitonRegistration{TInterface}"/> /// Register an Interface with a Type that implements it as a multiton and create a <see cref="IMultitonRegistration{TInterface}"/>
/// </summary> /// </summary>
/// <param name="tInterface">The Interface to register</param> /// <param name="tInterface">The Interface to register</param>
/// <param name="tImplementation">The Type that implements the <see cref="tInterface"/></param> /// <param name="tImplementation">The Type that implements the interface</param>
/// <param name="tScope">The Type of the multiton scope</param> /// <param name="tScope">The Type of the multiton scope</param>
/// <returns>A new created <see cref="IMultitonRegistration{TInterface}"/> with the given parameters</returns> /// <returns>A new created <see cref="IMultitonRegistration{TInterface}"/> with the given parameters</returns>
public static IRegistrationBase Register(Type tInterface, Type tImplementation, Type tScope) public static IRegistrationBase Register(Type tInterface, Type tImplementation, Type tScope)

@ -18,11 +18,16 @@ 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>
/// <typeparam name="TFactory">The type of the abstract typed factory</typeparam> /// <typeparam name="TFactory">The <see cref="Type"/> of the abstract typed factory</typeparam>
public class TypedFactoryRegistration<TFactory> : ITypedFactoryRegistration<TFactory> public class TypedFactoryRegistration<TFactory> : ITypedFactoryRegistration<TFactory>
{ {
private const string CLEAR_MULTITON_INSTANCE_METHOD_NAME = "ClearMultitonInstance"; private const string CLEAR_MULTITON_INSTANCE_METHOD_NAME = "ClearMultitonInstance";
/// <summary>
/// The registration that is used to register an abstract typed factory
/// </summary>
/// <param name="factoryType">The <see cref="Type"/> of the abstract typed factory</param>
/// <param name="container">The current instance of the <see cref="IIocContainer"/></param>
public TypedFactoryRegistration(Type factoryType, IIocContainer container) public TypedFactoryRegistration(Type factoryType, IIocContainer container)
{ {
InterfaceType = factoryType; InterfaceType = factoryType;
@ -37,7 +42,7 @@ namespace LightweightIocContainer.Registrations
public string Name { get; } public string Name { get; }
/// <summary> /// <summary>
/// The Type of the abstract typed factory that is registered with this <see cref="TypedFactoryRegistration{TFactory}"/> /// The <see cref="Type"/> of the abstract typed factory that is registered with this <see cref="TypedFactoryRegistration{TFactory}"/>
/// </summary> /// </summary>
public Type InterfaceType { get; } public Type InterfaceType { get; }
@ -127,7 +132,7 @@ namespace LightweightIocContainer.Registrations
#endif #endif
} }
generator.EmitCall(OpCodes.Callvirt, typeof(IIocContainer).GetMethod(nameof(IIocContainer.Resolve), new[] { typeof(Type), typeof(object[])}), null); generator.EmitCall(OpCodes.Callvirt, typeof(IIocContainer).GetMethod(nameof(IIocContainer.Resolve), new[] {typeof(Type), typeof(object[])}), null);
generator.Emit(OpCodes.Castclass, createMethod.ReturnType); generator.Emit(OpCodes.Castclass, createMethod.ReturnType);
generator.Emit(OpCodes.Ret); generator.Emit(OpCodes.Ret);
} }

@ -1,4 +1,3 @@
using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using LightweightIocContainer; using LightweightIocContainer;
using LightweightIocContainer.Exceptions; using LightweightIocContainer.Exceptions;

Loading…
Cancel
Save