Dev2.Intellisense.Helper.FileSystemQuery.GetServerNameFromInput C# (CSharp) Méthode

GetServerNameFromInput() public méthode

public GetServerNameFromInput ( string searchPath, List &queryCollection, string &sFileServer ) : bool
searchPath string
queryCollection List
sFileServer string
Résultat bool
        public bool GetServerNameFromInput(string searchPath, ref List<string> queryCollection, ref string sFileServer)
        {
            var fileServer = searchPath.Substring(2, searchPath.Length - 3);
            var c = searchPath[searchPath.Length - 1];
            bool bQueryUncShares =false;
            if(searchPath[0] == SlashC && searchPath[1] == SlashC && c == SlashC && !fileServer.Contains("\\"))
            {
                bQueryUncShares = true;
                sFileServer = fileServer;
            }
            else if (searchPath[0] == SlashC && searchPath[1] == SlashC && c != SlashC && !fileServer.Contains("\\"))
            {
                fileServer = searchPath.Substring(2);
                if(_computerNameCache.Count == 0)
                {
                    GetComputerNamesOnNetwork("\\",queryCollection);
                }
                queryCollection = _computerNameCache.Where(s => s.ToLower().Contains(fileServer.ToLower())).ToList();
            }
            return bQueryUncShares;
        }