public ICallSpecification FromPendingSpecification(MatchArgs matchArgs, PendingSpecificationInfo pendingSpecInfo) { return(pendingSpecInfo.Handle( callSpec => FromExistingSpec(callSpec, matchArgs), lastCall => { _receivedCalls.Delete(lastCall); return FromCall(lastCall, matchArgs); })); }
public ICallSpecification FromPendingSpecification(MatchArgs matchArgs, PendingSpecificationInfo pendingSpecInfo) { if (pendingSpecInfo == null) { throw new ArgumentNullException(nameof(pendingSpecInfo)); } return(pendingSpecInfo.Handle( callSpec => FromExistingSpec(callSpec, matchArgs), lastCall => { _receivedCalls.Delete(lastCall); return FromCall(lastCall, matchArgs); })); }