Ejemplo n.º 1
0
        public static Assembly GetReflectionAssembly(IAssembly assembly)
        {
            IReflectionAssembly reflectionAssembly = assembly as IReflectionAssembly;

            if (reflectionAssembly == null)
            {
                return(null);
            }
            return(reflectionAssembly.ReflectionAssembly);
        }
Ejemplo n.º 2
0
        public bool CompareTo(IAssembly assembly)
        {
            IReflectionAssembly reflectionAssembly = assembly as IReflectionAssembly;

            if (reflectionAssembly == null)
            {
                return(false);
            }
            return(this.InternalAssembly == reflectionAssembly.ReflectionAssembly);
        }
Ejemplo n.º 3
0
        private static bool ShouldRefreshLibraryAssembly(List <IAssembly> removedAssemblies, List <IAssembly> addedAssemblies, IAssembly libraryAssembly)
        {
            if (removedAssemblies.Contains(libraryAssembly) || addedAssemblies.Contains(libraryAssembly))
            {
                return(true);
            }
            IReflectionAssembly reflectionAssembly = libraryAssembly as IReflectionAssembly;

            if (reflectionAssembly == null)
            {
                return(false);
            }
            HashSet <string> strs = new HashSet <string>();

            TypeResolver.BuildCurrentReachableAssemblies(reflectionAssembly.ReflectionAssembly, strs, AppDomain.CurrentDomain.GetAssemblies());
            bool flag  = removedAssemblies.Any <IAssembly>((IAssembly removedAssembly) => strs.Contains(removedAssembly.FullName));
            bool flag1 = addedAssemblies.Any <IAssembly>((IAssembly addedAssembly) => strs.Contains(addedAssembly.FullName));

            if (!flag)
            {
                return(flag1);
            }
            return(true);
        }