diff Implab/Promise.cs @ 243:b1e0ffdf3451 v3

working on promises
author cin
date Wed, 24 Jan 2018 19:24:10 +0300
parents 8200ab154c8a
children
line wrap: on
line diff
--- a/Implab/Promise.cs	Wed Jan 24 03:03:21 2018 +0300
+++ b/Implab/Promise.cs	Wed Jan 24 19:24:10 2018 +0300
@@ -2,24 +2,24 @@
 using Implab.Parallels;
 
 namespace Implab {
-    public class Promise : AbstractPromise, IDeferred {
+    public class Promise : AbstractPromise {
         public static readonly IPromise Success;
 
         static Promise() {
             Success = new SuccessPromise();
         }
 
-        public void Resolve() {
+        internal void ResolvePromise() {
             SetResult();
         }
 
-        public void Reject(Exception error) {
+        internal void RejectPromise(Exception error) {
             SetError(error);
-        }
-
-        public static IPromise FromException(Exception exception) {
-            return new FailedPromise(exception);
-        }
+        }
+
+        public static IPromise Reject(Exception exception) {
+            return new FailedPromise(exception);
+        }
     }
 }