/src/LinFu.AOP/Interfaces/IWeaver.cs
http://github.com/philiplaureano/LinFu · C# · 24 lines · 8 code · 1 blank · 15 comment · 0 complexity · a9d2ebe1d535cb11f9b09319c994355c MD5 · raw file
- namespace LinFu.AOP.Cecil.Interfaces
- {
- /// <summary>
- /// Represents a class that can weave (or modify)
- /// a member embedded in an assembly.
- /// </summary>
- /// <typeparam name="T">The type of object to modify.</typeparam>
- /// <typeparam name="THost">The host that holds the item to be modified.</typeparam>
- public interface IWeaver<T, THost> : IHostWeaver<THost>
- {
- /// <summary>
- /// Determines whether or not the current item should be modified.
- /// </summary>
- /// <param name="item">The target item.</param>
- /// <returns>Returns <c>true</c> if the current item can be modified; otherwise, it should return <c>false.</c></returns>
- bool ShouldWeave(T item);
- /// <summary>
- /// Modifies the target <paramref name="item" />.
- /// </summary>
- /// <param name="item">The item to be modified.</param>
- void Weave(T item);
- }
- }