{"id":24629487,"url":"https://github.com/sharpjs/dotstuff","last_synced_at":"2025-07-09T15:35:24.036Z","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":"2024-04-27T15:07:41.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T04:40:06.023Z","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":"isc","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":"2024-04-27T15:07:44.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","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264486086,"owners_count":23615968,"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":["c-sharp","extension-methods","method-chaining"],"created_at":"2025-01-25T06:13:04.646Z","updated_at":"2025-07-09T15:35:23.954Z","avatar_url":"https://github.com/sharpjs.png","language":"C#","readme":"## About\n\nDotStuff is a source-only NuGet package that adds 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.\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\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)       // =\u003e bar = foo;\n\n// Right coalesce\nfoo.CoalesceTo(ref bar)     // =\u003e bar ??= foo;\n\n// Tap\nfoo.Tap(action)             // { action(foo);       return foo; }\nfoo.Tap(x, action)          // { action(foo, x);    return foo; }\nfoo.Tap(x, y, action)       // { action(foo, x, y); return foo; }\n// ... up to 3 extra arguments\n\n// Apply\nfoo.Apply(function)         // =\u003e function(foo);\nfoo.Apply(x, function)      // =\u003e function(foo, x);\nfoo.Apply(x, y, function)   // =\u003e function(foo, x, y);\n// ... up to 3 extra arguments\n```\n\nFor Ruby developers, `Tap` and `Apply` are the C# equivalents of\n[`tap`](https://ruby-doc.org/3.3.0/Kernel.html#method-i-tap) and\n[`then`](https://ruby-doc.org/3.3.0/Kernel.html#method-i-then).\n`AssignTo` is similar to using Ruby's `=\u003e`\n[pattern-matching](https://ruby-doc.org/3.3.0/syntax/pattern_matching_rdoc.html)\noperator for rightward assignment.\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#override-the-default)\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 2024 Jeffrey Sharp\n  SPDX-License-Identifier: ISC\n--\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"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"}