Beispiel #1
0
        private IEnumerable <OrphanAssemblyBinding> GetBindingRedirectOnlyReferences()
        {
            var allAssemblyIds = GetAllAssemblyReferences().SelectMany(p => p).Select(k => k.Key).ToHashSet();

            return(MsBuildProject.GetBindingRedirects()
                   .Where(br => !allAssemblyIds.Contains(br.Name))
                   .Select(br => new OrphanAssemblyBinding(br)));
        }
Beispiel #2
0
        private IEnumerable <OrphanOrMismatchAssemblyBinding> GetBindingRedirectMismatchReferences()
        {
            var allAssemblyIds = GetAllAssemblyReferences().SelectMany(p => p).ToDictionary(k => k.Key, v => v.Value);

            return(MsBuildProject.GetBindingRedirects()
                   .Where(br => !(allAssemblyIds.ContainsKey(br.Name) && allAssemblyIds[br.Name].Equals(br.NewVersion)))
                   .Select(br => new OrphanOrMismatchAssemblyBinding(br)));
        }