/src/LinFu.AOP/Interfaces/IHostWeaver.cs

http://github.com/philiplaureano/LinFu · C# · 23 lines · 9 code · 2 blank · 12 comment · 0 complexity · c92d11186b5c406e4394c50e388c7d5d MD5 · raw file

  1. using Mono.Cecil;
  2. namespace LinFu.AOP.Cecil.Interfaces
  3. {
  4. /// <summary>
  5. /// Represents a weaver class that can modify its host.
  6. /// </summary>
  7. /// <typeparam name="THost">The host that holds the item to be modified.</typeparam>
  8. public interface IHostWeaver<THost>
  9. {
  10. /// <summary>
  11. /// Imports references into the target <see cref="ModuleDefinition" /> instance.
  12. /// </summary>
  13. /// <param name="module">The module that will hold the modified item.</param>
  14. void ImportReferences(ModuleDefinition module);
  15. /// <summary>
  16. /// Adds additional members to the host type.
  17. /// </summary>
  18. /// <param name="host">The host that holds the current item being modified.</param>
  19. void AddAdditionalMembers(THost host);
  20. }
  21. }