GetAssemblyFile() static private method

static private GetAssemblyFile ( Mono.Cecil.AssemblyNameReference reference, string prefix, string gac ) : string
reference Mono.Cecil.AssemblyNameReference
prefix string
gac string
return string
Esempio n. 1
0
 private AssemblyDefinition GetAssemblyInMonoGac(AssemblyNameReference reference, ReaderParameters parameters)
 {
     for (int i = 0; i < this.gac_paths.Count; i++)
     {
         string item         = this.gac_paths[i];
         string assemblyFile = BaseAssemblyResolver.GetAssemblyFile(reference, string.Empty, item);
         if (File.Exists(assemblyFile))
         {
             return(this.GetAssembly(assemblyFile, parameters));
         }
     }
     return(null);
 }
Esempio n. 2
0
 private AssemblyDefinition GetAssemblyInNetGac(AssemblyNameReference reference, ReaderParameters parameters)
 {
     string[] strArrays = new string[] { "GAC_MSIL", "GAC_32", "GAC_64", "GAC" };
     string[] empty     = new string[] { string.Empty, "v4.0_" };
     for (int i = 0; i < 2; i++)
     {
         for (int j = 0; j < (int)strArrays.Length; j++)
         {
             string str          = Path.Combine(this.gac_paths[i], strArrays[j]);
             string assemblyFile = BaseAssemblyResolver.GetAssemblyFile(reference, empty[i], str);
             if (Directory.Exists(str) && File.Exists(assemblyFile))
             {
                 return(this.GetAssembly(assemblyFile, parameters));
             }
         }
     }
     return(null);
 }