Exemplo n.º 1
0
        private void OnPromiseProgress(string message)
        {
            string promiseHandle = GetMessagePromiseHandle(message);
            string progress      = GetMessageProgress(message);

            if (m_PromiseCoroutineMap.Contains(promiseHandle))
            {
                PDFJS_PromiseCoroutine promiseCoroutine = (PDFJS_PromiseCoroutine)m_PromiseCoroutineMap[promiseHandle];

                promiseCoroutine.Promise.Progress = float.Parse(progress);
            }
        }
Exemplo n.º 2
0
        private void OnPromiseCatch(string message)
        {
            string promiseHandle = GetMessagePromiseHandle(message);
            string objectHandle  = GetMessageObjectHandle(message);

            if (m_PromiseCoroutineMap.Contains(promiseHandle))
            {
                PDFJS_PromiseCoroutine promiseCoroutine = (PDFJS_PromiseCoroutine)m_PromiseCoroutineMap[promiseHandle];

                promiseCoroutine.Promise.JSObjectHandle        = objectHandle;
                promiseCoroutine.Promise.HasSucceeded          = false;
                promiseCoroutine.Promise.HasReceivedJSResponse = true;

                m_PromiseCoroutineMap.Remove(promiseHandle);
            }
        }