using System.IO;

namespace XGame.Framework.Asset
{
    internal class BinaryAsset : Asset
    {
        public override AssetType AssetType => AssetType.Binary;
        public override object Clone()
        {
            if (Source != null)
            {
                Retain();
            }
            return Source;
        }

        protected override void OnDispose()
        {
            Stream stream = Source as Stream;
            if (stream != null)
            {
                stream.Dispose();
            }
        }

        protected override void OnInit()
        {

        }

        protected override void OnRelease()
        {

        }

        protected override void OnRetain()
        {

        }

        protected override void OnSetSource()
        {

        }
    }
}

