Ejemplo n.º 1
0
 public LoadedAssembly(LoadedAssembly bundle, string fileName, Task <Stream?>?stream,
                       IAssemblyResolver?assemblyResolver = null,
                       bool applyWinRTProjections         = false, bool useDebugSymbols = false)
     : this(bundle.assemblyList, fileName, stream, assemblyResolver, null,
            applyWinRTProjections, useDebugSymbols)
 {
     this.ParentBundle = bundle;
 }
Ejemplo n.º 2
0
        public LoadedAssembly(AssemblyList assemblyList, string fileName,
                              Task <Stream?>?stream = null, IAssemblyResolver?assemblyResolver = null, string?pdbFileName = null)
        {
            this.assemblyList             = assemblyList ?? throw new ArgumentNullException(nameof(assemblyList));
            this.fileName                 = fileName ?? throw new ArgumentNullException(nameof(fileName));
            this.PdbFileName              = pdbFileName;
            this.providedAssemblyResolver = assemblyResolver;

            this.loadingTask = Task.Run(() => LoadAsync(stream));             // requires that this.fileName is set
            this.shortName   = Path.GetFileNameWithoutExtension(fileName);
        }
Ejemplo n.º 3
0
            public MyAssemblyResolver(LoadedAssembly parent, bool loadOnDemand)
            {
                this.parent       = parent;
                this.loadOnDemand = loadOnDemand;

                this.providedAssemblyResolver = parent.providedAssemblyResolver;
                this.assemblyList             = parent.assemblyList;
                // Note: we cache a copy of the assembly list in the constructor, so that the
                // resolve calls only search-by-asm-name in the assemblies that were already loaded
                // at the time of the GetResolver() call.
                this.alreadyLoadedAssemblies = assemblyList.GetAssemblies();
                // If we didn't do this, we'd also search in the assemblies that we just started to load
                // in previous Resolve() calls; but we don't want to wait for those to be loaded.
                this.tfmTask           = parent.GetTargetFrameworkIdAsync();
                this.referenceLoadInfo = parent.LoadedAssemblyReferencesInfo;
            }
Ejemplo n.º 4
0
 public LoadedAssembly(LoadedAssembly bundle, string fileName, Task <Stream?>?stream, IAssemblyResolver?assemblyResolver = null)
     : this(bundle.assemblyList, fileName, stream, assemblyResolver)
 {
     this.ParentBundle = bundle;
 }