Example #1
0
 private void SetDeadline()
 {
     Fx.Assert(!_deadlineSet, "TimeoutHelper deadline set twice.");
     _deadline    = DateTime.UtcNow + _originalTimeout;
     _deadlineSet = true;
 }
 public static void End(IAsyncResult result)
 {
     Fx.AssertAndThrowFatal(result.IsCompleted, "CompletedAsyncResult was not completed!");
     AsyncResult.End <CompletedAsyncResult>(result);
 }
Example #3
0
        public override bool Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
        {
            Fx.Assert("Empty work items should never been executed.");

            return(true);
        }
Example #4
0
 internal void PurgeSingleBookmark(Bookmark bookmark)
 {
     Fx.Assert(_bookmarks.ContainsKey(bookmark) && object.ReferenceEquals(bookmark, _bookmarks[bookmark].Bookmark), "Something went wrong with our housekeeping - it must exist and must be our intenral reference");
     UpdateExclusiveHandleList(bookmark);
     _bookmarks.Remove(bookmark);
 }
Example #5
0
 public void CheckForCancelation()
 {
     Fx.Assert(_callbackWrapper != null, "We must have a callback wrapper if we are calling this.");
     _callbackWrapper.CheckForCancelation();
 }