コード例 #1
0
        async Task <BenchmarkResult> IMiner.StartBenchmark(CancellationToken stop, BenchmarkPerformanceType benchmarkType)
        {
            await Task.Delay(100);

            var bp = new BenchmarkResult {
                AlgorithmTypeSpeeds = new List <(AlgorithmType type, double speed)> {
                    (AlgorithmType.ZHash, 12)
                }, Success = true
            };

            return(GetValueOrErrorSettings.GetValueOrError("StartBenchmark", bp));
        }

        Task <object> IMiner.StartMiningTask(CancellationToken stop)
        {
            GetValueOrErrorSettings.SetError("StartMiningTask");
            return(Task.FromResult(new object()));
        }

        Task IMiner.StopMiningTask()
        {
            GetValueOrErrorSettings.SetError("StopMiningTask");
            return(Task.CompletedTask);
        }
    }
コード例 #2
0
 void IMiner.StopMining() => GetValueOrErrorSettings.SetError("StopMining");
コード例 #3
0
 void IMiner.InitMiningPairs(IEnumerable <MiningPair> miningPairs) => GetValueOrErrorSettings.SetError("InitMiningPairs");
コード例 #4
0
 void IMiner.InitMiningLocationAndUsername(string miningLocation, string username, string password) => GetValueOrErrorSettings.SetError("InitMiningLocationAndUsername");
コード例 #5
0
 void IInitInternals.InitInternals() => GetValueOrErrorSettings.SetError("InitInternals");