Exemple #1
0
        private bool RunProber(byte[] buf, int offset, int len, CharsetProber charsetProber)
        {
            var probingState = charsetProber.HandleData(buf, offset, len);

#if DEBUG
            charsetProber.DumpStatus();
#endif
            if (probingState == ProbingState.FoundIt)
            {
                _done            = true;
                _detectionDetail = new DetectionDetail(charsetProber);
                return(true);
            }
            return(false);
        }
 /// <summary>
 /// New Result
 /// </summary>
 public DetectionDetail(CharsetProber prober, TimeSpan?time = null)
     : this(prober.GetCharsetName(), prober.GetConfidence(), prober, time, prober.DumpStatus())
 {
 }