Example #1
0
        }     // AddThirdParty

        private void Sort()
        {
            var libraryComparer    = new DependencyLibraryNameComparer();
            var thirdPartyComparer = new ThirdPartyDependencyNameComparer();

            foreach (var item in _licenses)
            {
                var usedBy = item.Value;
                if (usedBy.Libraries.Count == 0)
                {
                    usedBy.Libraries = null;
                }
                else
                {
                    usedBy.Libraries.Sort(libraryComparer);
                } // if-else

                if (usedBy.ThirdParty.Count == 0)
                {
                    usedBy.ThirdParty = null;
                }
                else
                {
                    usedBy.ThirdParty.Sort(thirdPartyComparer);
                } // if-else
            }     // foreach
        }         // Sort
Example #2
0
        } // AddIndirectLibraryDependencies

        private void SortThirdParty()
        {
            var comparer = new ThirdPartyDependencyNameComparer();

            _dataList.Where(data => data.Dependencies?.ThirdPartySpecified ?? false).ForEach(data =>
            {
                data.Dependencies.ThirdParty.Sort(comparer);
            });
        } // ShortThirdParty