示例#1
0
        public OperationResult TryCalculate(string data)
        {
            _initializeProcessScoreCard.Wait();
            if (_scoreCard == null)
            {
                var keyForEncrypt = _rsaEncryption.GetKeyForEncrypt();
                return(new OperationResult(OperationStatus.NotInitializeScoreCard, keyForEncrypt));
            }
            var extractors      = GetExtractors();
            var calculateResult = _scoreCalculate.Calculate(data, _scoreCard, extractors);

            return(new OperationResult(OperationStatus.CompleteCalculate, score: calculateResult.Score));
        }