示例#1
0
        private int CompareVersions(string version1, string version2)
        {
            var one = new ParsedVersion(version1);
            var two = new ParsedVersion(version2);

            return(one.CompareTo(two));
        }
        private IEnumerable <Software> FilterSoftware(IEnumerable <Software> software, string version)
        {
            var filteredVersion          = new ParsedVersion(version);
            IList <Software> rtnSoftware = new List <Software>();

            foreach (var item in software)
            {
                var itemParsedVersion = new ParsedVersion(item.Version);

                if (itemParsedVersion.CompareTo(filteredVersion) > 0)
                {
                    rtnSoftware.Add(item);
                }
            }

            return(rtnSoftware);
        }