Basically all you need can be found here. Tested and it worked with mosquitto

here is working sample to send message:

var client = new MqttFactory().CreateMqttClient();
var options = new MqttClientOptionsBuilder()
.WithTcpServer("", 1883)
.WithCredentials("bud", "%spencer%")

 System.Threading.CancellationToken cancellationToken;
        await client.ConnectAsync(options, cancellationToken);

        var message = new MqttApplicationMessageBuilder()
        await client.PublishAsync(message, cancellationToken);    

develop Notepad++ plugins (in c#).

Notepad++ is awesome and you should be too, by developing plugins for it. To do so:
1) Go to notepad++ website, resource section (at least it was called it so back in 2020).
2) Find section about developing plugins, and options for other languages, select your language of choice.
3) Find “visual studio project template” zip archive, download it and copy it under your documents/Visual Studio 20xx/Project Templates
4) Open VS, create new project and search for “Notepad++” project template, it will create you nice “Hello plugin” sample.
Note: It might not showup. If everything fails, just search for example projects on same plugin page and use it as a template for your project.

useful sample to cover most needs

IntPtr currentScint = PluginBase.GetCurrentScintilla();
ScintillaGateway scintillaGateway = new ScintillaGateway(currentScint);

int numLines = scintillaGateway.GetLineCount(); 
StringBuilder endResult = new StringBuilder();
for (int lineIndex = 0; lineIndex < numLines; lineIndex += 1)
   string sourceData = scintillaGateway.GetLine(lineIndex);

Posting with Windows Auth

Problem: core controller method:

public async void StartWorkflow([FromBody] WFInitiationDataModel model)

Use powershell to test it:

$data = @{
    "sysName" = "LTPS"        

$payload = ConvertTo-Json $data

$url = "http://localhost:5000/api/startwf"
Write-Host "POST:$url"

$response = $payload | Invoke-WebRequest -uri $url -Method Post -UseDefaultCredentials -ContentType "application/json" -TimeoutSec 21600