Mercurial > pub > ImplabNet
diff Implab/Promise.cs @ 66:790e8a997d30
Refactoring
author | cin |
---|---|
date | Thu, 14 Aug 2014 18:08:09 +0400 |
parents | 653c4e04968b |
children | 1714fd8678ef |
line wrap: on
line diff
--- a/Implab/Promise.cs Mon Jun 30 13:55:22 2014 +0400 +++ b/Implab/Promise.cs Thu Aug 14 18:08:09 2014 +0400 @@ -99,7 +99,7 @@ m_cancellable = true; } - public Promise(IPromiseBase parent, bool cancellable) { + public Promise(IPromise parent, bool cancellable) { m_cancellable = cancellable; if (parent != null) AddHandler( @@ -252,11 +252,11 @@ return medium; } - public IPromiseBase Then(Action success, ErrorHandler error) { + public IPromise Then(Action success, ErrorHandler error) { return Then(x => success(), error); } - public IPromiseBase Then(Action success) { + public IPromise Then(Action success) { return Then(x => success()); } @@ -682,7 +682,7 @@ /// <remarks> /// Если в коллекции встречаюься <c>null</c>, то они воспринимаются как выполненные обещания. /// </remarks> - public static IPromiseBase CreateComposite(ICollection<IPromiseBase> promises) { + public static IPromise CreateComposite(ICollection<IPromise> promises) { if (promises == null) throw new ArgumentNullException(); if (promises.Count == 0) @@ -730,27 +730,27 @@ #region IPromiseBase explicit implementation - IPromiseBase IPromiseBase.Error(ErrorHandler error) { + IPromise IPromise.Error(ErrorHandler error) { return Error(error); } - IPromiseBase IPromiseBase.Anyway(Action handler) { + IPromise IPromise.Anyway(Action handler) { return Anyway(handler); } - IPromiseBase IPromiseBase.Finally(Action handler) { + IPromise IPromise.Finally(Action handler) { return Finally(handler); } - IPromiseBase IPromiseBase.Cancelled(Action handler) { + IPromise IPromise.Cancelled(Action handler) { return Cancelled(handler); } - void IPromiseBase.Join() { + void IPromise.Join() { Join(); } - void IPromiseBase.Join(int timeout) { + void IPromise.Join(int timeout) { Join(timeout); }