protected ReturnRuleDecorator(ReturnRule rule) { if (rule == null) { throw new ArgumentNullException(nameof(rule)); } Rule = rule; }
public TBuilder MatchMethod( ReturnRule returnRule, params ArgumentRule[] args) { if (returnRule == null) { throw new ArgumentNullException(nameof(returnRule)); } if (returnRule.GetSubRule <ReturnAsync>() == null) { returnRule = new ReturnAsync(returnRule, false); } Policy.AddMethodRule(new MethodRule(Policy.BindMethod, returnRule, args)); return((TBuilder)this); }
public ReturnVoid(ReturnRule rule) : base(rule) { }
public MethodRule(MethodBinder binder, ReturnRule returnValue, params ArgumentRule[] args) : this(binder, args) { _returnValue = returnValue; }
public ReturnAsync(ReturnRule rule, bool required = true) : base(rule) { _required = required; }