/src/LinFu.IoC/Configuration/InitializerPlugin.cs
http://github.com/philiplaureano/LinFu · C# · 31 lines · 15 code · 2 blank · 14 comment · 0 complexity · 3f623ad9235d1dcf1eee755614297cc2 MD5 · raw file
- using LinFu.IoC.Interfaces;
- using LinFu.Reflection;
- namespace LinFu.IoC.Configuration
- {
- /// <summary>
- /// A class that injects the <see cref="Initializer" /> postprocessor
- /// into every container that is created or loaded.
- /// </summary>
- public class InitializerPlugin : ILoaderPlugin<IServiceContainer>
- {
- /// <summary>
- /// This override does absolutely nothing.
- /// </summary>
- /// <param name="target">The target container.</param>
- public void BeginLoad(IServiceContainer target)
- {
- // Do nothing
- }
- /// <summary>
- /// Injects the <see cref="Initializer" /> postprocessor into
- /// the container.
- /// </summary>
- /// <param name="target"></param>
- public void EndLoad(IServiceContainer target)
- {
- target.PostProcessors.Add(new Initializer());
- }
- }
- }