public AssemblyReferences Except(IEnumerable <Assembly> assemblies) { if (assemblies == null) { throw new ArgumentNullException(nameof(assemblies)); } return(new AssemblyReferences(Assemblies.Except(assemblies), Paths)); }
public AssemblyReferences Except(AssemblyReferences references) { if (references == null) { throw new ArgumentNullException(nameof(references)); } return(new AssemblyReferences(Assemblies.Except(references.Assemblies), Paths.Except(references.Paths))); }
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)); }
public AssemblyReferences Except(AssemblyReferences references) { Guard.AgainstNullArgument("references", references); return(new AssemblyReferences(Assemblies.Except(references.Assemblies), Paths.Except(references.Paths))); }
public AssemblyReferences Except(IEnumerable <Assembly> assemblies) { Guard.AgainstNullArgument("assemblies", assemblies); return(new AssemblyReferences(Assemblies.Except(assemblies), Paths)); }