{"id":24629487,"url":"https://github.com/sharpjs/dotstuff","last_synced_at":"2026-05-16T09:34:32.008Z","repository":{"id":234761754,"uuid":"787891805","full_name":"sharpjs/DotStuff","owner":"sharpjs","description":"A few helpful extensions for method chaining in C#","archived":false,"fork":false,"pushed_at":"2025-10-19T18:18:25.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-14T15:15:55.549Z","etag":null,"topics":["c-sharp","extension-methods","method-chaining"],"latest_commit_sha":null,"homepage":"","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/sharpjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2024-04-17T11:34:45.000Z","updated_at":"2025-10-19T18:00:03.000Z","dependencies_parsed_at":"2024-04-23T03:28:20.812Z","dependency_job_id":null,"html_url":"https://github.com/sharpjs/DotStuff","commit_stats":null,"previous_names":["sharpjs/dotstuff"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sharpjs/DotStuff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpjs%2FDotStuff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpjs%2FDotStuff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpjs%2FDotStuff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpjs%2FDotStuff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharpjs","download_url":"https://codeload.github.com/sharpjs/DotStuff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpjs%2FDotStuff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33096964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c-sharp","extension-methods","method-chaining"],"created_at":"2025-01-25T06:13:04.646Z","updated_at":"2026-05-16T09:34:32.002Z","avatar_url":"https://github.com/sharpjs.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About\n\nDotStuff is a source-only NuGet package that adds a few helpful extensions for\nmethod chaining in C#.\n\n*Source-only* here means that DotStuff adds a single, hidden C# file to your\nproject.  There is no extra DLL to ship.  For libraries, there is no extra\ndependency that referencing projects see.  This is ideal for a micro-package\nlike DotStuff that consists of a single file.  The file itself is written\ncarefully to avoid conflicts with existing code and not decrease code coverage.\n\n## Status\n\n[![Build](https://github.com/sharpjs/DotStuff/workflows/Build/badge.svg)](https://github.com/sharpjs/DotStuff/actions)\n[![NuGet](https://img.shields.io/nuget/v/DotStuff.svg)](https://www.nuget.org/packages/DotStuff)\n[![NuGet](https://img.shields.io/nuget/dt/DotStuff.svg)](https://www.nuget.org/packages/DotStuff)\n\n- **Tested:**      100% coverage by automated tests.\n- **Documented:**  IntelliSense on everything.  Examples below.\n\n## Installation\n\nInstall [this NuGet Package](https://www.nuget.org/packages/DotStuff) in your\nproject.\n\n## Usage\n\n```csharp\n// Right assign\nfoo.AssignTo(out bar)                 // bar = foo\n\n// Right coalesce\nfoo.CoalesceTo(ref bar)               // bar ??= foo\n\n// Tap\nfoo.Tap(action)                       // action(foo);          return foo;\nfoo.Tap(action, x)                    // action(foo, x);       return foo;\nfoo.Tap(action, x, y)                 // action(foo, x, y);    return foo;\nfoo.Tap(action, x, y, z)              // action(foo, x, y, z); return foo;\n\n// Apply\nfoo.Apply(function)                   // function(foo)\nfoo.Apply(function, x)                // function(foo, x)\nfoo.Apply(function, x, y)             // function(foo, x, y)\nfoo.Apply(function, x, y, z)          // function(foo, x, y, z)\n\n// Extract\nfoo.Extract(func, out bar)            // bar = func(foo);          return foo;\nfoo.Extract(func, x, out bar)         // bar = func(foo, x);       return foo;\nfoo.Extract(func, x, y, out bar)      // bar = func(foo, x, y);    return foo;\nfoo.Extract(func, x, y, z, out bar)   // bar = func(foo, x, y, z); return foo;\n```\n\nFor Ruby developers, `Tap` and `Apply` are C# analogues to\n[`tap`](https://ruby-doc.org/3.4.1/Kernel.html#method-i-tap) and\n[`then`](https://ruby-doc.org/3.4.1/Kernel.html#method-i-then).\n`AssignTo` is similar to using Ruby's `=\u003e`\n[pattern-matching](https://ruby-doc.org/3.4.1/syntax/pattern_matching_rdoc.html)\noperator for rightward assignment.  The other methods build on that inspiration\nin the context of C#.\n\n## Options\n\nDotStuff responds to the following preprocessor symbols.\n\n- `DOTSTUFF_DISABLE`\n\n  Define this symbol to disable DotStuff completely.\n\n- `DOTSTUFF_ENABLE_CODE_COVERAGE`\n\n  Define this symbol to include the DotStuff extension methods in code\n  coverage.  By default, the extension methods are excluded.\n\n- `DOTSTUFF_HAS_CSHARP_8_OR_GREATER`\n\n  If this symbol is defined, DotStuff uses C# 8.0 features, such as the `??=`\n  operator required for `CoalesceTo`.\n\n  This symbol is defined by default for target frameworks that use C# 8.0 or\n  later by default: .NET 5.0, .NET Core 3.0, .NET Standard 2.1, and later.\n\n  Define this symbol to use C# 8.0 features on older target frameworks.  Make\n  sure to [configure the language version](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/configure-language-version)\n  of the project to C# 8.0 or later.\n\n- `DOTSTUFF_HAS_NULLABLE`\n\n  If this symbol is defined, DotStuff uses [nullability attributes](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/attributes/nullable-analysis).\n\n  This symbol is defined by default for target frameworks that provide these\n  attributes: .NET 5.0, .NET Core 3.0, .NET Standard 2.1, and later.\n\n  Define this symbol to use nullability attributes on older target frameworks.\n  Some source of those attributes will be required.  One easy option is to use\n  Manuel Römer's [Nullable](https://www.nuget.org/packages/nullable) package.\n\n\u003c!--\n  Copyright Subatomix Research Inc.\n  SPDX-License-Identifier: MIT\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpjs%2Fdotstuff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpjs%2Fdotstuff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpjs%2Fdotstuff/lists"}