{"id":19908919,"url":"https://github.com/pragmatrix/fluent.extensions","last_synced_at":"2025-05-03T02:31:29.201Z","repository":{"id":36948371,"uuid":"41255926","full_name":"pragmatrix/Fluent.Extensions","owner":"pragmatrix","description":"Fluent.Extensions is a portable class library that implements extensions methods for collections and more","archived":false,"fork":false,"pushed_at":"2018-07-29T15:31:14.000Z","size":22,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T04:45:12.784Z","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":"koajs/koa-redis","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pragmatrix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-23T15:51:59.000Z","updated_at":"2024-10-28T21:19:58.000Z","dependencies_parsed_at":"2022-07-11T14:33:30.734Z","dependency_job_id":null,"html_url":"https://github.com/pragmatrix/Fluent.Extensions","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pragmatrix%2FFluent.Extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pragmatrix%2FFluent.Extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pragmatrix%2FFluent.Extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pragmatrix%2FFluent.Extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pragmatrix","download_url":"https://codeload.github.com/pragmatrix/Fluent.Extensions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252133714,"owners_count":21699585,"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","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":"2024-11-12T21:13:50.616Z","updated_at":"2025-05-03T02:31:28.971Z","avatar_url":"https://github.com/pragmatrix.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fluent.Extensions\r\n\r\nFluent.Extensions is a netstandard class library that supports programming against [fluent interfaces](https://en.wikipedia.org/wiki/Fluent_interface). Its primary purpose is to ease the transition to a more fluent programming style as part of every [AutoFluent](https://github.com/pragmatrix/AutoFluent) package.\r\n\r\n## Installation\r\n\r\nFluent.Extensions can be installed separately [via NuGet](https://www.nuget.org/packages/Collections.Fluent/).\r\n\r\n## Contents\r\n\r\n### Generic collections extension methods\r\n\r\nFluent.Extensions contains all extension methods defined in the [Collections.Fluent project](https://github.com/pragmatrix/Collections.Fluent) that are used to modify generic collections inside a method chain. They are available as soon the namespace System.Collections.Generic is used.\r\n\r\n### General purpose methods\r\n\r\nThe following general purpose extension methods are defined in the global namespace, they are available as soon Fluent.Extensions is referenced by your project.\r\n\r\n#### Do()\r\n\r\nThe `Do()` extension method can be inserted inside a method chain to call back into lambda expression or a method. The lambda expression is expected to have exactly one parameter that receives the current object of the method chain. `Do()` always returns the current object.\r\n\r\nFor example:\r\n\r\n\tvar x = 10;\r\n\t1.Do(v =\u003e x += v)\r\n\t .Do(v =\u003e x += v*2);\r\n\r\nSets x to 13.\r\n\r\n#### Pipe()\r\n\r\nThe `Pipe(f)` extension calls the function *f* with the current object of the method chain and continues with the function's result.\r\n\r\nFor example:\r\n\r\n\tvar x = 10.Pipe(a =\u003e a * a);\r\n\r\nSets x to 100.\r\n\r\n### AutoFluent specific extension methods\r\n\r\nThese are extension methods used by [AutoFluent](https://github.com/pragmatrix/AutoFluent) generated packages.\r\n\r\n#### DemoteSender()\r\n\r\nThe `DemoteSender()` extension method forwards a call to an `Action\u003c\u003e` delegate with the first parameter set to the `object` type to an `Action\u003c\u003e` delegate with the concrete type of a class by casting the first argument. This is used to provide an event's `sender` as a concrete instance type to client code that handles the event. Instead of code generating each forwarding lambda, AutoFluent uses `DemoteSender()` to reduce the code size of the resulting AutoFluent class library.\r\n\r\n## License \u0026 Copyright\r\n\r\nLicense: BSD\r\n\r\nCopyright © 2016 Armin Sander\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpragmatrix%2Ffluent.extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpragmatrix%2Ffluent.extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpragmatrix%2Ffluent.extensions/lists"}