Mipa 1.0.1

dotnet add package Mipa --version 1.0.1
NuGet\Install-Package Mipa -Version 1.0.1
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="Mipa" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mipa --version 1.0.1
#r "nuget: Mipa, 1.0.1"
#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.
// Install Mipa as a Cake Addin
#addin nuget:?package=Mipa&version=1.0.1

// Install Mipa as a Cake Tool
#tool nuget:?package=Mipa&version=1.0.1

Mipa

Mini Parser for text that contains attributed values. Originally designed to work similarily to Discord slash command arguments, but without having to set them as actual variables. Though its use-cases may vary to cases like terminal apps.

How to use it

var parser = new MipaParser();

var result = parser.Parse("hello! foo:bar");

result.Content // "hello!"
result.Arguments // [{"foo": "bar"}]

Parsing Input

Any parsed text in Mipa comes with a basic set of parsing for arguments. Any type with the IParsable interface implemented works with Mipa.

var result = parser.Parse("welcome to the chat! date:08/18/2018");
result.GetArgument<DateTime>("date") // 8/18/2018 12:00:00 AM

Defining your own argument parsers

The recommended way to implemented argument parsers is to implement IParsable into your data structure. Mipa will pass the raw text into TryParse, and will return a value if the parser succeeds in parsing it.

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. 
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
1.0.1 638 1/11/2024
1.0.0 84 1/11/2024