Interfaces.cs 1011 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Reflection;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace VCommon.Ioc
  8. {
  9. /// <summary> 单例注入 </summary>
  10. public interface ISingletonIocClass { }
  11. /// <summary> 单例注入, 带拦截器 </summary>
  12. public interface ISingletonIocClass<TInterceptor> where TInterceptor : IInterceptor { }
  13. /// <summary> 每次实例注入 </summary>
  14. public interface ITransientIocClass { }
  15. /// <summary> 每次实例注入,带拦截器 </summary>
  16. public interface ITransientIocClass<TInterceptor> where TInterceptor : IInterceptor { }
  17. /// <summary> 拦截器 </summary>
  18. public interface IInterceptor
  19. {
  20. void BeforeInvoke(Type svcClass, MethodBase svcMethod, IReadOnlyDictionary<string, object> paramDic);
  21. void AfterInvoke(Type svcClass, MethodBase svcMethod, IReadOnlyDictionary<string, object> paramDic, object resultReturnValue, Exception resultException);
  22. }
  23. }