Inheritance: IAssemblyTarget
Beispiel #1
0
        /// <inheritdoc/>
        public IAssemblyTarget LoadAssembly(LoadMethod loadMethod, string assemblyPath, string pdbPath = null)
        {
            IAssemblyTarget target   = null;
            var             assembly = this.loader.LoadAssembly(loadMethod, assemblyPath, pdbPath);

            if (loadMethod == LoadMethod.LoadBits)
            {
                // Assemlies loaded by bits will have the codebase set to the assembly that loaded it. Set it to the correct path here.
                var codebaseUri = new Uri(assemblyPath);
                target = AssemblyTarget.FromPath(codebaseUri, assembly.Location, assembly.FullName);
            }
            else
            {
                target = AssemblyTarget.FromAssembly(assembly);
            }

            return(target);
        }
Beispiel #2
0
        /// <inheritdoc />
        public IAssemblyTarget[] GetAssemblies()
        {
            var assemblies = this.loader.GetAssemblies();

            return(assemblies.Select(x => AssemblyTarget.FromAssembly(x)).ToArray());
        }
Beispiel #3
0
 /// <inheritdoc/>
 public IList <IAssemblyTarget> LoadAssemblyWithReferences(LoadMethod loadMethod, string assemblyPath)
 {
     return(this.loader.LoadAssemblyWithReferences(loadMethod, assemblyPath).Select(x => AssemblyTarget.FromAssembly(x)).ToList());
 }