Esempio n. 1
0
        public IAsyncOperation Unlock(Editor editor)
        {
            var operation = new MutableAsyncOperation();

            UnlockImpl(editor, () => {
                operation.Progress = 1.0f;
                operation.Done     = true;

                operation.InvokeSafe();
            });

            return(operation);
        }
Esempio n. 2
0
        public IAsyncOperation Get(string requestUrl)
        {
            var operation = new MutableAsyncOperation();

            GetImpl(requestUrl, cachedFileUrl => {
                operation.Progress = 1.0f;
                operation.Result   = cachedFileUrl;
                operation.Done     = true;

                operation.InvokeSafe();
            });

            return(operation);
        }
Esempio n. 3
0
        public IAsyncOperation Put(UnityWebRequest completeRequest)
        {
            var operation = new MutableAsyncOperation();

            PutImpl(completeRequest, () => {
                operation.Progress = 1.0f;
                operation.Result   = completeRequest;
                operation.Done     = true;

                operation.InvokeSafe();
            });

            return(operation);
        }
Esempio n. 4
0
        public IAsyncOperation Lock(string requestUrl)
        {
            var operation = new MutableAsyncOperation();

            LockImpl(requestUrl, editor => {
                operation.Progress = 1.0f;
                operation.Result   = editor;
                operation.Done     = true;

                operation.InvokeSafe();
            });

            return(operation);
        }