Пример #1
0
        public void RSGPromise()
        {
            var deferred = new Promise <object>();
            IPromise <object> promise = deferred;

            for (int i = 0; i < N; ++i)
            {
                int index = i;
                promise = promise
                          // Native methods.
                          .ContinueWith(() => (IPromise)RSGPromiseHelper.rsgVoids[index])
                          .ContinueWith(() => (IPromise <Vector4>)RSGPromiseHelper.rsgVectors[index])
                          .ContinueWith(() => (IPromise <object>)RSGPromiseHelper.rsgObjects[index]);
            }

            promise.Done();
            deferred.Resolve(Instances.obj);
            RSGPromiseHelper.ResolveDeferreds();
        }
Пример #2
0
 public void CleanupRSGPromises()
 {
     RSGPromiseHelper.ClearRSGPromises();
 }
Пример #3
0
 public void SetupRSGPromises()
 {
     RSGPromiseHelper.SetRSGPromises();
 }
Пример #4
0
 public void CleanupRSGPromises()
 {
     RSGPromiseHelper.ClearDeferreds();
 }
Пример #5
0
 public void SetupRSGPromises()
 {
     RSGPromiseHelper.SetDeferreds(N);
 }