Пример #1
0
        public static FermatsTest Start(BigInteger bi, BigInteger Iters, GetNextNumber gn, ChangeCurrentNumber OnFound)
        {
            FermatsTest nw = new FermatsTest(bi, Iters, OnFound);

            nw.GetNext = gn;
            nw.Start();
            return(nw);
        }
Пример #2
0
        public static FermatsTest Start(BigInteger bi, BigInteger Iters, GetNextNumber gn)
        {
            FermatsTest nw = new FermatsTest(bi, Iters);

            nw.GetNext = gn;
            nw.Start();
            return(nw);
        }
Пример #3
0
 public SolovayStrassenTest(int id, GetNextNumber GetNext, ChangeCurrentNumber OnNumFound)
 {
     GetNext(ref _Current);
     _GetNext    = GetNext;
     _OnNumFound = OnNumFound;
     Id          = id;
     th          = new Thread(ThreadTest);
     th.Priority = ThreadPriority.BelowNormal;
 }
Пример #4
0
 public object Any(GetNextNumber request)
 {
     if (request.ForKey == null)
     {
         throw new ArgumentException("ForKey property must not be null and must be file name safe.");
     }
     return(new GetNextNumberResponse
     {
         ForKey = request.ForKey,
         NextSequenceNumber = NumberStore.GetNextSequenceNumber(request.ForKey)
     });
 }