コード例 #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);
        }
コード例 #2
0
 /// <summary>
 /// New Result
 /// </summary>
 public DetectionDetail(CharsetProber prober, TimeSpan?time = null)
     : this(prober.GetCharsetName(), prober.GetConfidence(), prober, time, prober.DumpStatus())
 {
 }