/src/LinFu.IoC/Configuration/ReflectionMethodBuilder.cs

http://github.com/philiplaureano/LinFu · C# · 23 lines · 13 code · 1 blank · 9 comment · 0 complexity · 459914acfb49c55990b52e0d7c7f1c70 MD5 · raw file

  1. using System.Reflection;
  2. using LinFu.IoC.Configuration.Interfaces;
  3. namespace LinFu.IoC.Configuration
  4. {
  5. /// <summary>
  6. /// Represents a <see cref="IMethodBuilder{TMethod}" /> type that simply lets
  7. /// methods pass through it without performing any modifications to those methods.
  8. /// </summary>
  9. public class ReflectionMethodBuilder<TMethod> : IMethodBuilder<TMethod>
  10. where TMethod : MethodBase
  11. {
  12. /// <summary>
  13. /// Returns the <paramref name="existingMethod" /> unmodified.
  14. /// </summary>
  15. /// <param name="existingMethod">The method to be modified.</param>
  16. /// <returns>The modified method.</returns>
  17. public MethodBase CreateMethod(TMethod existingMethod)
  18. {
  19. return existingMethod;
  20. }
  21. }
  22. }