/// <summary> /// Optional constructor, allowing the genrator of the contained <see cref="PrimeNumberCache"/> to be set /// </summary> /// <param name="requestedGenerator">The prime number generator to request the cache to use</param> public GoldbachPairCalculator(IPrimeNumberGenerator requestedGenerator) { _cache = new PrimeNumberCache(requestedGenerator); }
/// <summary> /// Constructor for testinf purposes, allowing a specific - maybe mock - prime number cache to be used /// </summary> /// <param name="cache"></param> internal GoldbachPairCalculator(IPrimeNumberCache cache) { _cache = cache; }
/// <summary> /// Default constructor, which will initialise the contained <see cref="PrimeNumberCache"/> with a default prime number generator /// </summary> public GoldbachPairCalculator() { _cache = new PrimeNumberCache(); }