示例#1
0
 /// <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);
 }
示例#2
0
 /// <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;
 }
示例#3
0
 /// <summary>
 /// Default constructor, which will initialise the contained <see cref="PrimeNumberCache"/> with a default prime number generator
 /// </summary>
 public GoldbachPairCalculator()
 {
     _cache = new PrimeNumberCache();
 }