Link.Foundation.Links.Notation 0.11.2

dotnet add package Link.Foundation.Links.Notation --version 0.11.2
                    
NuGet\Install-Package Link.Foundation.Links.Notation -Version 0.11.2
                    
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="Link.Foundation.Links.Notation" Version="0.11.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Link.Foundation.Links.Notation" Version="0.11.2" />
                    
Directory.Packages.props
<PackageReference Include="Link.Foundation.Links.Notation" />
                    
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 Link.Foundation.Links.Notation --version 0.11.2
                    
#r "nuget: Link.Foundation.Links.Notation, 0.11.2"
                    
#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 Link.Foundation.Links.Notation@0.11.2
                    
#: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=Link.Foundation.Links.Notation&version=0.11.2
                    
Install as a Cake Addin
#tool nuget:?package=Link.Foundation.Links.Notation&version=0.11.2
                    
Install as a Cake Tool

C# implementation of the Links Notation parser using Pegasus parser generator and Platform.Collections.

Installation

Package Manager

Install-Package Link.Foundation.Links.Notation

.NET CLI

dotnet add package Link.Foundation.Links.Notation

PackageReference

<PackageReference Include="Link.Foundation.Links.Notation" Version="0.9.0" />

Build from Source

Clone the repository and build:

git clone https://github.com/link-foundation/links-notation.git
cd links-notation/csharp
dotnet build Link.Foundation.Links.Notation.sln

Test

Run tests:

dotnet test

Usage

Basic Parsing

using Link.Foundation.Links.Notation;

// Create parser
var parser = new Parser();

// Parse Links Notation format string
string input = @"papa (lovesMama: loves mama)
son lovesMama
daughter lovesMama
all (love mama)";

var links = parser.Parse(input);

// Access parsed links
foreach (var link in links)
{
    Console.WriteLine(link.ToString());
}

Converting Back to String

using Link.Foundation.Links.Notation;

// Format links back to string
string formatted = links.Format();
Console.WriteLine(formatted);
// Create link programmatically
var link = new Link<string>("id", new[] { "value1", "value2" });

// Access link properties
Console.WriteLine($"ID: {link.Id}");
foreach (var value in link.Values)
{
    Console.WriteLine($"Value: {value}");
}

Advanced Usage with Generic Types

// Using numeric link addresses
var parser = new Parser<ulong>();
var numericLinks = parser.Parse("(1: 2 3)");

// Working with custom address types
var customParser = new Parser<Guid>();

Syntax Examples

Doublets (2-tuple)

papa (lovesMama: loves mama)
son lovesMama
daughter lovesMama
all (love mama)

Triplets (3-tuple)

papa has car
mama has house
(papa and mama) are happy

N-tuples with References

(linksNotation: links notation)
(This is a linksNotation as well)
(linksNotation supports (unlimited number (of references) in each link))

API Reference

Classes

  • Parser<TLinkAddress>: Main parser class for converting strings to links
  • Link<TLinkAddress>: Represents a single link with ID and values
  • LinksGroup<TLinkAddress>: Container for grouping related links

Extension Methods

  • IListExtensions.Format(): Converts list of links back to string format
  • ILinksGroupListExtensions: Additional operations for link groups

Dependencies

  • .NET 8.0
  • Microsoft.CSharp (4.7.0)
  • Pegasus (4.1.0)
  • Platform.Collections (0.3.2)

Documentation

For complete API documentation, visit: Link.Foundation.Links.Notation Documentation

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 was computed.  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.11.2 124 10/31/2025
0.11.1 150 10/31/2025
0.11.0 101 10/18/2025
0.9.0 99 10/18/2025

Added README.md to NuGet package for better package documentation.