
using XGame.Framework.Asyncs;

namespace XGame.Framework.Asset
{
    /// <summary>
    /// AssetModule用
    /// </summary>
    public interface IAssetEventListenerSetter
    {
        /// <summary>
        /// 事件处理器
        /// </summary>
        IAssetEventListener AssetEventListener { set; }
    }
    ///// <summary>
    ///// GetResult的回调监听
    ///// </summary>
    ///// <param name="path"></param>
    ///// <param name="result"></param>
    //public delegate void OnAssetGetResult(string path, object result);
    /// <summary>
    /// AssetModule用，业务不要用
    /// </summary>
    public interface IAssetEventListener
    {
        ///// <summary>
        ///// 资源标签
        ///// </summary>
        //string AssetTag { get; set; }
        ///// <summary>
        ///// GetResult的回调监听，Module使用，业务不要调用
        ///// </summary>
        ///// <param name="action"></param>
        //void OnGetResult(OnAssetGetResult action);
        ///// <summary>
        ///// GetResult的回调监听，Module使用，业务不要调用
        ///// </summary>
        ///// <param name="action"></param>
        //void RemoveOnGetResult(OnAssetGetResult action);
        /// <summary>
        /// GetResult的回调监听，Module使用，业务不要调用
        /// </summary>
        /// <param name="addressableName"></param>
        /// <param name="result"></param>
        void OnGetResult(string addressableName, object result);
        /// <summary>
        /// 释放缓存
        /// </summary>
        /// <param name="async"></param>
        void ReleaseAsync(IAsync async);
    }
}
