MqttTopicBuilder 1.1.0

Additional Details

Please upgrade to version 2.0.2 or more for the latest maintained versions

There is a newer version of this package available.
See the version list below for details.
dotnet add package MqttTopicBuilder --version 1.1.0                
NuGet\Install-Package MqttTopicBuilder -Version 1.1.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="MqttTopicBuilder" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MqttTopicBuilder --version 1.1.0                
#r "nuget: MqttTopicBuilder, 1.1.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.
// Install MqttTopicBuilder as a Cake Addin
#addin nuget:?package=MqttTopicBuilder&version=1.1.0

// Install MqttTopicBuilder as a Cake Tool
#tool nuget:?package=MqttTopicBuilder&version=1.1.0                

MqttTopicBuilder Build Deployment

MqttTopicBuilder is a tool to build valid and verified MQTT topics.

Installation

You can find this projet on NuGet.

To install it from the command line, use:
~$ dotnet add package MqttTopicBuilder

or, from the package manager:
Install-Package MqttTopicBuilder

Usage

Using a custom builder, MqttTopicBuilder allows you to build topics and ensure their veracity.

    var topicBuilder = new TopicBuilder();

    topicBuilder.AddTopic("Hello")
        .AddTopic("World")
        .AddTopic("From GitHub")
        .AddWildcardMultiLevel();

    var resultingTopic = builder.Build();

    Console.WriteLine(resultingTopic);
    // output: "Hello/World/FromGitHub/#

The built object is a Topic object. It can be used to both access the topic but also gather informations about it such as its level.

    var topic = new TopicBuilder()
        .AddTopic("Hello")
        .AddTopic("World");

    Console.WriteLine(resultingTopic.Level);
    // output: 2

    Console.WriteLine(resultingTopic.Path);
    // output: Hello/World

Dependencies

This project is using FluentAssertions for its unit tests.

Contributions

All contributions are welcome, please feel free to suggests pull requests !

Product 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. 
.NET Core netcoreapp3.1 is compatible. 
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.