コード例 #1
0
ファイル: Patcher.cs プロジェクト: frozen4/UnityPlus
    private CalcMd5ThreadInfo CalcMemMd5(IntPtr pData, int dataSize)
    {
        if (_CalcMd5Result.IsRunning)
        {
            return(_CalcMd5Result);
        }

        if (_CalcMd5Thread == null)
        {
            _CalcMd5Thread = new AssetUtility.SingleThreadWorker();
        }

        _CalcMd5Result.IsRunning = true;
        _CalcMd5Thread.StartTask(() =>
        {
            _CalcMd5Result.Md5       = FileOperate.CalcMemMd5(pData, dataSize);
            _CalcMd5Result.IsRunning = false;
        });

        return(_CalcMd5Result);
    }