예제 #1
0
        private static IEnumerable <string> FindAllConfigs(ISlnResult sln, SlnItems items)
        {
            if (sln == null)
            {
                throw new ArgumentNullException(nameof(sln));
            }

            if (items.HasFlag(SlnItems.PackagesConfigSolution))
            {
                foreach (var config in FindSolutionConfigs(sln, items))
                {
                    yield return(config);
                }
            }

            if (items.HasFlag(SlnItems.PackagesConfigLegacy))
            {
                foreach (var config in FindLegacyConfigs(sln))
                {
                    yield return(config);
                }
            }
        }
예제 #2
0
파일: SlnItemsTest.cs 프로젝트: 3F/MvsSln
        public void AllItemsTest2(SlnItems input, params SlnItems[] ignoring)
        {
            foreach (var item in Enum.GetValues(typeof(SlnItems)))
            {
                SlnItems v = (SlnItems)item;
                if (!input.HasFlag(v))
                {
                    bool failed = true;
                    foreach (var ignore in ignoring)
                    {
                        if (v.HasFlag(ignore))
                        {
                            failed = false;
                            break;
                        }
                    }

                    if (failed)
                    {
                        Assert.False(true, $"`{input}` is not completed. Found `{v}`");
                    }
                }
            }
        }