{"id":24546650,"url":"https://github.com/devizer/universe.yetanothercomparerbuilder","last_synced_at":"2025-10-27T13:39:18.009Z","repository":{"id":74856666,"uuid":"114661445","full_name":"devizer/Universe.YetAnotherComparerBuilder","owner":"devizer","description":"Emit-free, fast, strongly typed, highly-customizable yet another ComparerBuilder","archived":false,"fork":false,"pushed_at":"2019-12-21T12:58:45.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T19:03:10.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devizer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-12-18T16:12:21.000Z","updated_at":"2019-12-21T12:58:47.000Z","dependencies_parsed_at":"2023-03-29T18:47:32.038Z","dependency_job_id":null,"html_url":"https://github.com/devizer/Universe.YetAnotherComparerBuilder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devizer/Universe.YetAnotherComparerBuilder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devizer%2FUniverse.YetAnotherComparerBuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devizer%2FUniverse.YetAnotherComparerBuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devizer%2FUniverse.YetAnotherComparerBuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devizer%2FUniverse.YetAnotherComparerBuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devizer","download_url":"https://codeload.github.com/devizer/Universe.YetAnotherComparerBuilder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devizer%2FUniverse.YetAnotherComparerBuilder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001982,"owners_count":26083243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-22T22:16:25.188Z","updated_at":"2025-10-09T19:04:20.667Z","avatar_url":"https://github.com/devizer.png","language":"C#","readme":"# Universe.YetAnotherComparerBuilder\nEmit-free, fast, strongly typed, highly-customizable yet another ComparerBuilder\n\n\n\u003cimg src='images/yet-another-standard.png' width='500px' height='283px'\u003e\u003c/img\u003e\n\n## The icing on the\nExtended order direction can be applyed to both an element comparer and a field comparer:\n```csharp\n[Flags]\npublic enum OrderFlavour\n{\n    Forward = 0,\n    Backward = 1,\n    NullGoesFinally = 0,\n    NullGoesEarly = 2,\n    Default = Forward | NullGoesFinally,\n}\n```\n\n# Sample\nIn this sample all Doctors aged 42 will ahead of another persons.\n```csharp\npublic class Demo\n{\n    class Person\n    {\n        public string Title;\n        public string Name;\n        public int? Age;\n    }\n\n    public static void Test()\n    {\n        StringComparer ignoreCase = StringComparer.InvariantCultureIgnoreCase;\n        string highlightTitle = \"Dr.\";\n        int highlightAge = 42;\n\n        IComparer\u003cPerson\u003e comparer = new ComparerBuilder\u003cPerson\u003e()\n            .Compare(x =\u003e ignoreCase.Equals(highlightTitle, x.Title))\n            .Compare(x =\u003e x.Age.HasValue \u0026\u0026 highlightAge == x.Age.Value)\n            .CompareString(x =\u003e x.Name, ignoreCase)\n            .CompareString(x =\u003e x.Title, ignoreCase)\n            .Compare(x =\u003e x.Age, OrderFlavour.Backward | OrderFlavour.NullGoesFinally)\n            .GetComparer();\n\n        Enumerable.Empty\u003cPerson\u003e().ToList().Sort(comparer);\n        Enumerable.Empty\u003cPerson\u003e().OrderBy(x =\u003e x, comparer).ToList();\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevizer%2Funiverse.yetanothercomparerbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevizer%2Funiverse.yetanothercomparerbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevizer%2Funiverse.yetanothercomparerbuilder/lists"}