public Promise(Exception exception) { Exception = exception ?? throw new ArgumentNullException(nameof(exception)); _hashCode = Exception.GetHashCode(); WaitHandle = new ManualResetEventSlim(true); _onCompleted = new StrongDelegateCollection(true); }
public Promise(Exception exception) { Exception = exception; _hashCode = exception.GetHashCode(); _waitHandle = new ManualResetEventSlim(true); _onCompleted = new StrongDelegateCollection(true); }
public Promise(bool done) { Exception = null; _hashCode = base.GetHashCode(); if (!done) { WaitHandle = new ManualResetEventSlim(false); } _onCompleted = new StrongDelegateCollection(true); }
public Needle(T target) { if (target == null) { _target = null; _hashCode = base.GetHashCode(); } else { _target = new StructNeedle <T>(target); _hashCode = target.GetHashCode(); } _onCompleted = new StrongDelegateCollection(true); }
private INeedle <T> _target; // Can be null - set in SetTargetValue and SetTargetError public Needle() { _target = null; _hashCode = base.GetHashCode(); _onCompleted = new StrongDelegateCollection(true); }