Ejemplo n.º 1
0
        public AssemblyReferences Except(IEnumerable <Assembly> assemblies)
        {
            if (assemblies == null)
            {
                throw new ArgumentNullException(nameof(assemblies));
            }

            return(new AssemblyReferences(Assemblies.Except(assemblies), Paths));
        }
Ejemplo n.º 2
0
        public AssemblyReferences Except(AssemblyReferences references)
        {
            if (references == null)
            {
                throw new ArgumentNullException(nameof(references));
            }

            return(new AssemblyReferences(Assemblies.Except(references.Assemblies), Paths.Except(references.Paths)));
        }
Ejemplo n.º 3
0
        public AssemblySet Remove(IEnumerable <IAssembly> assemblies)
        {
            var snapshot        = assemblies.ToArray();
            var assemblyPaths   = Assemblies.Except(snapshot).Select(a => a.Location).ToArray();
            var dependencyPaths = Dependencies.Except(snapshot).Select(a => a.Location).ToArray();
            var allPaths        = assemblyPaths.Union(dependencyPaths);
            var newAssemblySet  = FromPaths(allPaths, Name);
            var newAssemblies   = assemblyPaths.Select(p => newAssemblySet.Host.LoadUnitFrom(p)).OfType <IAssembly>();

            return(newAssemblySet.WithAssemblies(newAssemblies));
        }
Ejemplo n.º 4
0
        public AssemblyReferences Except(AssemblyReferences references)
        {
            Guard.AgainstNullArgument("references", references);

            return(new AssemblyReferences(Assemblies.Except(references.Assemblies), Paths.Except(references.Paths)));
        }
Ejemplo n.º 5
0
        public AssemblyReferences Except(IEnumerable <Assembly> assemblies)
        {
            Guard.AgainstNullArgument("assemblies", assemblies);

            return(new AssemblyReferences(Assemblies.Except(assemblies), Paths));
        }