Foundational .NET libraries shared across Meshmakers and OctoMesh services. The repository publishes a set of small, dependency-light NuGet packages multi-targeting net8.0/net9.0/net10.0 (with netstandard2.0 for Shared).
- Meshmakers.Common.Shared - common primitives and helpers: extension methods for strings, enumerables, dates, types, URIs and exceptions;
ArgumentValidationguards;MmPathpath normalization;RandomGenerator; INI file reading/writing (IniFile); a localization-provider abstraction (ILocalizationProvider); MEF-based composition helpers (CompositionExtensions); abstracted services for compression, console and environment access (ICompressionService,IConsoleService,IEnvironmentService); and a small dependency-aware task runner (TaskEngine/TaskBase). Targetsnet8.0,net9.0andnetstandard2.0. - Meshmakers.Common.Configuration - persists strongly-typed
IOptions<T>settings to a per-usersettings.jsonunder the user profile viaIConfigWriter/ConfigWriter. Built onMicrosoft.Extensions.OptionsandSystem.IO.Abstractions. - Meshmakers.Common.CommandLineParser - command/argument parser for console applications.
IParserServiceparses and validates arguments, models commands and their arguments, renders usage information, and supports registered code samples.ICommandParseradditionally serves an implicit help flag -help,hor?, each accepted with the-,--and/prefix, where-hand its variants give way to a command declaringhitself - that narrows the output down in three levels: on its own it lists the command groups, followed by a group name (--help "Identity Services", prefixes and lower case accepted) it lists that group's commands, and together with a command (-c <command> --help) it renders that command's arguments, samples and notes. The reserved topic--help allstill prints the full listing. Built onMicrosoft.Extensions.Logging.AbstractionsandMicrosoft.Extensions.Options. - Meshmakers.Common.Metrics - runtime measurement and Prometheus publishing.
IMetricsContextcreates scopedIRuntimeMeterinstances with named checkpoints and exposes results, optionally publishing them on a Prometheus metrics endpoint (default port9184). Built onprometheus-netandprometheus-net.AspNetCore.
src/- the four packable libraries plusCommandLineParser.Sample, a runnable console example.test/- xUnit-style test projects for each library (SharedTests,ConfigurationTests,CommandLineParserTests,MetricsTests).
dotnet build Meshmakers.Common.slndotnet test Meshmakers.Common.slnThe complete OctoMesh documentation is available at https://docs.meshmakers.cloud.
Released under the MIT License.