示例#1
0
        public AssemblyDefinition Resolve(string name)
        {
            if (File.Exists(name))
            {
                AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly(name, _readerParameters);
                return(_resolver.CacheAssembly(assembly));
            }

            return(Resolve(new AssemblyNameReference(name, new Version())));
        }
示例#2
0
        public AssemblyDefinition Resolve(string name)
        {
            if (File.Exists(name))
            {
                try {
                    AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly(name, _readerParameters);
                    return(_resolver.CacheAssembly(assembly));
                } catch (Exception e) {
                    throw new AssemblyResolutionException(new AssemblyNameReference(name, new Version()), e);
                }
            }

            return(Resolve(new AssemblyNameReference(name, new Version())));
        }
示例#3
0
 public AssemblyDefinition Resolve(string name)
 {
     if (File.Exists(name))
     {
         AssemblyDefinition assembly = AssemblyFactory.GetAssembly(name);
         _resolver.CacheAssembly(assembly);
         SafeLoadSymbols(assembly);
         return(assembly);
     }
     else
     {
         AssemblyNameReference reference = new AssemblyNameReference();
         reference.Name = name;
         return(Resolve(reference));
     }
 }