Ejemplo n.º 1
0
        public AssemblyDomain(string key) : base(key)
        {
#if !NETSTANDARD2_0
            _load_resolver = new AssemblyDependencyResolver(AppDomain.CurrentDomain.BaseDirectory);
#endif

            ShortReferences = new ShortNameReference();
            DomainManagement.Add(key, this);
        }
Ejemplo n.º 2
0
        static AssemblyDomain()
        {
            var defaultDomain = DomainManagement.RegisterDefault <AssemblyDomain>();

            foreach (var asm in DependencyContext
                     .Default
                     .CompileLibraries
                     .SelectMany(cl => cl.ResolveReferencePaths()))
            {
                defaultDomain.ShortReferences.Add(asm);
            }
        }
Ejemplo n.º 3
0
        static AssemblyDomain()
        {
            _defaultDomain  = DomainManagement.RegisterDefault <AssemblyDomain>();
            _shareLibraries = new ConcurrentQueue <string>();
            var assemblies = AppDomain.CurrentDomain.GetAssemblies();

            foreach (var asm in assemblies)
            {
                try
                {
                    _shareLibraries.Enqueue(asm.Location);
                }
                catch (Exception)
                {
                }
            }
        }