AlastairLundy.EnhancedLinq.MsExtensions 0.2.0

Prefix Reserved
dotnet add package AlastairLundy.EnhancedLinq.MsExtensions --version 0.2.0
                    
NuGet\Install-Package AlastairLundy.EnhancedLinq.MsExtensions -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AlastairLundy.EnhancedLinq.MsExtensions" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AlastairLundy.EnhancedLinq.MsExtensions" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="AlastairLundy.EnhancedLinq.MsExtensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AlastairLundy.EnhancedLinq.MsExtensions --version 0.2.0
                    
#r "nuget: AlastairLundy.EnhancedLinq.MsExtensions, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AlastairLundy.EnhancedLinq.MsExtensions@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AlastairLundy.EnhancedLinq.MsExtensions&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=AlastairLundy.EnhancedLinq.MsExtensions&version=0.2.0
                    
Install as a Cake Tool

EnhancedLinq.MsExtensions

A set of LINQ lambda-style extension methods specifically designed for working with StringSegment in .NET.

This library enhances the usability of StringSegment by providing deferred execution and immediate mode LINQ style extensions.

License

This project is licensed under the Mozilla Public License 2.0. See the LICENSE file for more details.

Features

  • Deferred Execution Extensions: These extensions return a sequence that is enumerated upon usage of the returned sequence.
  • Immediate Mode Extensions: These extensions operate in immediate mode, executing as soon as they are called.

Installation

You can install the EnhancedLinq.MsExtensions package via NuGet Package Manager with the following command:

Install-Package AlastairLundy.EnhancedLinq.MsExtensions

Alternatively, you can add it to your project file:

<PackageReference Include="AlastairLundy.EnhancedLinq.MsExtensions" Version="0.1.0" />

Usage

Here are some examples of how to use the extensions provided by EnhancedLinq.MsExtensions:

Example 1: Using Immediate Mode Extensions

using AlastairLundy.EnhancedLinq.MsExtensions.StringSegments.Immediate;
using Microsoft.Extensions.Primitives;

StringSegment segment = new StringSegment("Hello, World!");

// Using the Count extension
int count = segment.Count(c => c == 'o'); // Returns 2

Example 2: Using Deferred Execution Extensions

using AlastairLundy.EnhancedLinq.MsExtensions.StringSegments.Deferred;
using Microsoft.Extensions.Primitives;

// Using the Where extension
IEnumerable<T> filteredChars = segment.Where(c => char.IsUpper(c)); // Returns { 'H', 'W' }

Contributing

Contributions are welcome! If you would like to contribute to EnhancedLinq.MsExtensions, please follow the contributing guide.

Support

For any issues or feature requests, please open an issue in the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 14 8/27/2025
0.1.0.1 48 8/22/2025

### Changes since 0.1.0
* Changed root namespace