LyricsEngine.LyricSearch.ValidateSearchOutput C# (CSharp) Метод

ValidateSearchOutput() публичный Метод

public ValidateSearchOutput ( string lyric, string site ) : bool
lyric string
site string
Результат bool
        public bool ValidateSearchOutput(string lyric, string site)
        {
            if (_mSearchHasEnded == false)
            {
                Monitor.Enter(this);
                try
                {
                    ++_mSitesSearched;

                    // Parse the lyrics and find a suitable lyric, if any
                    if (!lyric.Equals(AbstractSite.NotFound) && lyric.Length != 0)
                    {
                        // if the lyrics hasn't been found by another site, then we have found the lyrics to count!
                        if (_lyricFound == false)
                        {
                            _lyricFound = true;
                            _mLyricsController.LyricFound(lyric, _mOriginalArtist, _mOriginalTrack, site, _mRow);
                            Dispose();
                            return true;
                        }
                            // if another was quicker it is just too bad... return
                        else
                        {
                            return false;
                        }
                    }
                        // still other lyricsites to search
                    else if (_mSitesSearched < LyricsSites.Length)
                    {
                        return false;
                    }
                        // the search got to end due to no more sites to search
                    else
                    {
                        _mLyricsController.LyricNotFound(_mOriginalArtist, _mOriginalTrack, "A matching lyric could not be found!", site, _mRow);
                        Dispose();
                        return false;
                    }
                }
                finally
                {
                    Monitor.Exit(this);
                }
            }
            return false;
        }