Scot.Massie.Calls 2.0.0

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

Massie Calls

A small library for saving, loading, and handling the a call-like syntax, in the form of Name, Name(Args), Name[Annotations], or Name[Annotations](Args).

How to install

From Nuget

Include the package Scot.Massie.Calls

From Github

  1. Go to https://github.com/c-massie/Massie-Calls/releases
  2. Download the latest .dll version of the library and the accompanying .xml file, containing documentation for the library. Place them together in the same desired directory.
  3. Right-click the project you want to add this to, go to Add Reference... in VS, Add... > Add Reference... in Rider.
  4. Click the "Add from..."/"Browse" button in the window that opens, and navigate to the .dll file downloaded.

How to use

Create a new CallNode with the constructors, or by passing the string representation of one in the appropriate format to its static parse methods. (Parse(string) or TryParse(string, out CallNode))

ToString() provides a string representation of a call, which can be parsed.

Format

The call format looks like this: Label: Name[Annotations](Args), where:

  • "Label" is a prefix to the name.
  • "Name" is the name of the node.
  • "Annotations" is a comma-separated list of inner nodes, enclosed in square brackets.
  • "Args" is a comma-separated list of inner nodes, enclosed in round brackets.
  • The colon and the text before it may be omitted altogether to indicate a lack of a label.
  • The square brackets may be omitted altogether to indicate a lack of annotations.
  • The round brackets may be omitted altogether to indicate a lack of arguments.

The label and name may be enclosed in quotation marks. (e.g. "Name", "Name"(Args), or "Label": Name)

Special characters

  • Brackets, square brackets, commas, and backslashes (()[],\) must be preceded by a backslash to count as the literal characters rather than their syntactical meaning.
  • Quotes (") must always be preceded by a backlash to count as the literal quote character.
  • Colons (:) must be preceded by a backslash to count as a literal character in labels, or in unlabelled names. They may be left unescaped in named that have labelled.
  • Non-space whitespace must be represented with the following escape sequences:
    • \n for newlines.
    • \r for carriage returns.
    • \t for tabs.
  • Spaces may be represented with the escape sequence \s.
  • Spaces surrounding the name, square brackets, round brackets, annotations, or children are trimmed. To represent leading or trailing spaces literally, either use quotes (e.g. "Name "(Args)) or the \s escape sequence. (e.g. Name \s(Args))

Why

I needed a single-line human-readable representation of something like function calls, for use in config files. This lets me define things like if[condition](action) in my config files.

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.
  • net8.0

    • No dependencies.

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
2.0.0 132 8/7/2026
1.0.0 121 7/27/2026