public BehaviourResponseBuilder <BehaviourBuilder <T> > AddResponse(string name) { var response = BehaviourResponse <BehaviourBuilder <T> > .Create(this, name); Instance.Response = response.Instance; return(response); }
public static BehaviourResponseBuilder <TBuilder> Create(TBuilder model, string name) { if (model is null) { throw new ArgumentNullException(nameof(model)); } if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException(name); } var behaviour = new BehaviourResponse(name); return(new BehaviourResponseBuilder <TBuilder>(model, behaviour)); }
public BehaviourResponseBuilder(TBuilder builder, BehaviourResponse response) { Build = builder; Instance = response ?? throw new ArgumentNullException(nameof(response)); }