using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace VCommon.Ioc
{
    /// <summary> 单例注入 </summary>
    public interface ISingletonIocClass { }

    /// <summary> 单例注入, 带拦截器 </summary>
    public interface ISingletonIocClass<TInterceptor> where TInterceptor : IInterceptor { }

    /// <summary> 每次实例注入 </summary>
    public interface ITransientIocClass { }

    /// <summary> 每次实例注入,带拦截器 </summary>
    public interface ITransientIocClass<TInterceptor> where TInterceptor : IInterceptor { }

    /// <summary> 拦截器 </summary>
    public interface IInterceptor
    {
        void BeforeInvoke(Type svcClass, MethodBase svcMethod, IReadOnlyDictionary<string, object> paramDic);
        void AfterInvoke(Type svcClass, MethodBase svcMethod, IReadOnlyDictionary<string, object> paramDic, object resultReturnValue, Exception resultException);
    }
}
