MackySoft.Text.Vocabularies
0.1.0
dotnet add package MackySoft.Text.Vocabularies --version 0.1.0
NuGet\Install-Package MackySoft.Text.Vocabularies -Version 0.1.0
<PackageReference Include="MackySoft.Text.Vocabularies" Version="0.1.0" />
<PackageVersion Include="MackySoft.Text.Vocabularies" Version="0.1.0" />
<PackageReference Include="MackySoft.Text.Vocabularies" />
paket add MackySoft.Text.Vocabularies --version 0.1.0
#r "nuget: MackySoft.Text.Vocabularies, 0.1.0"
#:package MackySoft.Text.Vocabularies@0.1.0
#addin nuget:?package=MackySoft.Text.Vocabularies&version=0.1.0
#tool nuget:?package=MackySoft.Text.Vocabularies&version=0.1.0
MackySoft.Text.Vocabularies
MackySoft.Text.Vocabularies defines finite, typed vocabularies whose values map one-to-one to canonical text.
The package targets netstandard2.1 and does not depend on System.Text.Json. It is suitable for protocol literals, configuration values, and other machine-readable closed sets that need one exact text for each declared value.
Installation
Install a pinned version from nuget.org:
dotnet add package MackySoft.Text.Vocabularies --version <version>
Define and Resolve a Vocabulary
using MackySoft.Text.Vocabularies;
[VocabularyDefinition]
public enum DeploymentMode
{
[VocabularyText("safe")]
Safe,
[VocabularyText("advanced")]
Advanced,
}
string text = Vocabulary.GetText(DeploymentMode.Safe);
if (Vocabulary.TryGetValue("advanced", out DeploymentMode mode))
{
Console.WriteLine(mode);
}
foreach (VocabularyEntry<DeploymentMode> entry in Vocabulary.GetEntries<DeploymentMode>())
{
Console.WriteLine($"{entry.Text}: {entry.Value}");
}
Resolution uses ordinal comparison. The package does not trim input, ignore case, resolve aliases, or normalize Unicode.
Definition Guarantees
A vocabulary is validated on first use. Validation rejects definitions that:
- have no declared members;
- omit
VocabularyTextAttributefrom any member; - repeat a typed value or canonical text;
- use empty, whitespace-only, leading-whitespace, or trailing-whitespace text.
Vocabulary.Validate(Type) validates a definition known only at runtime. Vocabulary.IsVocabulary(Type) discovers declared definitions and validates them without requiring a JSON adapter or another consumer to inspect member metadata.
Non-Goals
This package does not provide descriptions, examples, JSON Schema, general text codecs, path rules, JSON canonicalization, or product-specific input policy.
For System.Text.Json string values and property names, use MackySoft.Text.Vocabularies.Json.
Repository and Support
Source, issues, and support are available in the MackySoft .NET Foundations repository.
License
This package is under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on MackySoft.Text.Vocabularies:
| Package | Downloads |
|---|---|
|
MackySoft.Text.Vocabularies.Json
System.Text.Json adapters for finite typed text vocabularies. |
|
|
MackySoft.JsonSchema.Generation
Product-independent JSON Contract Model, JSON Schema Draft 2020-12, and type metadata generation for .NET. |
|
|
MackySoft.Ucli.Contracts
Shared contract types for uCLI IPC protocol. |
|
|
MackySoft.Ucli.Unity
Unity Editor plugin for uCLI IPC and automation. |
|
|
MackySoft.AgentDistribution
Reusable .NET services for building, distributing, installing, exporting, and diagnosing skills and custom-agent artifacts. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 4,797 | 7/24/2026 |