Beispiel #1
0
 public void SatisfyGeneral(VerifierWithReasonDelegate verifier)
 {
     if (verifier == null)
     {
         throw new ArgumentNullException(nameof(verifier));
     }
     VerifierCallbacks.Add(VerifierWrapper(verifier));
 }
Beispiel #2
0
 protected static Func <Packet, KeyValuePair <bool, string> > VerifierWrapper(VerifierWithReasonDelegate verifier)
 {
     return((cid) =>
     {
         string reason;
         bool result = verifier(cid, out reason);
         return new KeyValuePair <bool, string>(result, reason);
     });
 }
Beispiel #3
0
 public void SatisfyGeneral(VerifierWithReasonDelegate verifier)
 {
     Condition.Requires(verifier, "verifier").IsNotNull();
     VerifierCallbacks.Add(VerifierWrapper(verifier));
 }