Exemplo n.º 1
0
        public InteractiveAssemblyLoader(MetadataShadowCopyProvider shadowCopyProvider = null)
        {
            _shadowCopyProvider = shadowCopyProvider;

            Assembly mscorlib = typeof(object).Assembly;

            _loadedAssembliesByPath = new Dictionary <string, Assembly>(StringComparer.OrdinalIgnoreCase)
            {
                { mscorlib.Location, mscorlib }
            };

            _loadedAssemblies = new Dictionary <Assembly, LoadedAssembly>()
            {
                { mscorlib, new LoadedAssembly {
                      LoadedExplicitly = true, OriginalPath = mscorlib.Location
                  } }
            };

            _loadedAssembliesBySimpleName = new Dictionary <string, List <Assembly> >(StringComparer.OrdinalIgnoreCase)
            {
                { "mscorlib", new List <Assembly> {
                      mscorlib
                  } }
            };

            _identitiesBySimpleName = new Dictionary <string, List <AssemblyIdentityAndLocation> >();

            AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AssemblyResolve);
        }
Exemplo n.º 2
0
            public ShadowCopyReference(MetadataShadowCopyProvider provider, string originalPath, MetadataReferenceProperties properties)
                : base(properties, originalPath)
            {
                Debug.Assert(originalPath != null);
                Debug.Assert(provider != null);

                _provider = provider;
            }
Exemplo n.º 3
0
        public InteractiveAssemblyLoader(MetadataShadowCopyProvider shadowCopyProvider = null)
        {
            _shadowCopyProvider = shadowCopyProvider;

            Assembly mscorlib = typeof(object).GetTypeInfo().Assembly;

            _assembliesLoadedFromLocationByFullPath = new Dictionary <string, AssemblyAndLocation>();
            _assembliesLoadedFromLocation           = new Dictionary <Assembly, LoadedAssembly>();
            _loadedAssembliesBySimpleName           = new Dictionary <string, List <Assembly> >(AssemblyIdentityComparer.SimpleNameComparer);
            _dependenciesWithLocationBySimpleName   = new Dictionary <string, List <AssemblyIdentityAndLocation> >();

            CorLightup.Desktop.AddAssemblyResolveHandler(AssemblyResolve);
        }