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); }
public override bool Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) { Fx.Assert("Empty work items should never been executed."); return(true); }
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); }
public void CheckForCancelation() { Fx.Assert(_callbackWrapper != null, "We must have a callback wrapper if we are calling this."); _callbackWrapper.CheckForCancelation(); }