A lightweight IOC Container that is powerful enough to do all the things you need it to do.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1009 B

// Author: Gockner, Simon
// Created: 2019-06-07
// Copyright(c) 2019 SimonG. All Rights Reserved.
using System;
using LightweightIocContainer.Interfaces;
namespace LightweightIocContainer.Exceptions
{
/// <summary>
/// The <see cref="System.Type"/> is already registered in this <see cref="IIocContainer"/>
/// </summary>
internal 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)
: base($"Type {type.Name} is already registered in this IocContainer.")
{
Type = type;
}
/// <summary>
/// The registered <see cref="System.Type"/>
/// </summary>
public Type Type { get; }
}
}