Example #1
0
        public Search(string searchPattern, FileType fileTypeFilter, SearchType searchType)
        {
            if (searchPattern == null)
                throw new ArgumentNullException("searchPattern");
            if (searchPattern.Length < 3)
                throw new ArgumentException();
            if (fileTypeFilter == null)
            {
                throw new ArgumentNullException("fileTypeFilter");
            }

            m_Results = new SearchResultCollection(Core.Searches);
            // 2007-05-27 T.Norad
            m_FileTypeFilter = fileTypeFilter;
            m_SearchPattern = searchPattern;
            m_SearchFloodingHash = Core.GenerateFloodingHash();
            m_SearchPeerID = Core.GenerateIDOrHash();
            m_SearchID = Core.GenerateIDOrHash();
            m_SearchIDString = Core.ByteArrayToString(m_SearchID);
            m_SearchType = searchType;
        }
Example #2
0
 public Search(string searchPattern, FileType fileTypeFilter)
     : this(searchPattern, fileTypeFilter, SearchType.Auto)
 {
 }
Example #3
0
 public Search(string searchPattern, FileType fileTypeFilter)
     : this(searchPattern, fileTypeFilter, SearchType.Auto)
 {
 }