예제 #1
0
        private string GetAssemblyGacPath(string assemblyName)
        {
            string        str1          = (string)null;
            GacEnumerator gacEnumerator = new GacEnumerator(assemblyName);
            string        str2          = string.Empty;

            while (true)
            {
                string nextAssembly = gacEnumerator.GetNextAssembly();
                try
                {
                    if (nextAssembly != null)
                    {
                        if (str2 != string.Empty && this.CompareVersionNumbers(str2, nextAssembly) == 1)
                        {
                            str1 = GacEnumerator.QueryAssemblyInfo(str2);
                            break;
                        }
                        else
                        {
                            str1 = GacEnumerator.QueryAssemblyInfo(nextAssembly);
                            str2 = nextAssembly;
                        }
                    }
                    else
                    {
                        break;
                    }
                }
                catch (Exception ex)
                {
                    Globals.AddException(ex);
                }
            }
            return(str1);
        }
예제 #2
0
 private string GetAssemblyGacPath(string assemblyName)
 {
     string str1 = (string) null;
       GacEnumerator gacEnumerator = new GacEnumerator(assemblyName);
       string str2 = string.Empty;
       while (true)
       {
     string nextAssembly = gacEnumerator.GetNextAssembly();
     try
     {
       if (nextAssembly != null)
       {
     if (str2 != string.Empty && this.CompareVersionNumbers(str2, nextAssembly) == 1)
     {
       str1 = GacEnumerator.QueryAssemblyInfo(str2);
       break;
     }
     else
     {
       str1 = GacEnumerator.QueryAssemblyInfo(nextAssembly);
       str2 = nextAssembly;
     }
       }
       else
     break;
     }
     catch (Exception ex)
     {
       Globals.AddException(ex);
     }
       }
       return str1;
 }