MigratoryData.Client.DotNet 6.0.4

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

// Install MigratoryData.Client.DotNet as a Cake Tool
#tool nuget:?package=MigratoryData.Client.DotNet&version=6.0.4                

MigratoryData Client SDK for .Net

DOCUMENTATION


Please refer to the Developer's Guide and the Reference Manual of the MigratoryData Client SDK for .Net located at:

https://migratorydata.com/docs/client-api/dotnet/

SAMPLE

Steps for building realtime client applications using C# .NET

Prerequisites

.Net SDK

Create Project

Create a getting started project with:

dotnet new console -n getting-started-csharp-client-api
Add API library

Change to the folder of your project and add the API library with:

dotnet add package MigratoryData.Client.DotNet --version 6.0.4
Configure

Copy the below code snippet to the file Program.cs of your project.

Build & Run

Use the following command to build and run your project:

dotnet run

In this example the MigratoryData Client API is set to connect to the MigratoryData server located at address localhost:8800 and subscribe to the subject /server/status.

If you don't have a MigratoryData server installed on your machine but there is docker installed you can run the following commands to start MigratoryData server, otherwise you can download and install the latest version for your os from here.

docker pull migratorydata/server:latest
docker run -d --name my_migratorydata -p 8800:8800 migratorydata/server:latest
// For API documentation go to (Developer’s Guide)[https://migratorydata.com/docs/client-api/dotnet/]
using System;
using System.Collections.Generic;
using com.migratorydata.client;
using System.Threading;
namespace example
{
    class Program
    {
        static void Main(string[] args)
        {
            MigratoryDataClient client = new MigratoryDataClient();
            client.SetLogListener(new LogList(), MigratoryDataLogLevel.DEBUG);
            client.SetListener(new Listener());

            //client.SetEncryption(true);
            client.SetEntitlementToken("some-token");
            client.SetServers(new string[] { "127.0.0.1:8800" });

            List<string> subjects = new List<string>();
            subjects.Add("/server/status");
            client.Subscribe(subjects);

            client.Connect();

            // publish a message every 3 seconds
            int count = 1;
            while (count < 1000000)
            {
                client.Publish(new MigratoryDataMessage("/server/status", System.Text.Encoding.ASCII.GetBytes("data - " + count), "id" + count));
                count++;
                Thread.Sleep(3000);
            }
        }
        class Listener : MigratoryDataListener
        {
            public void OnMessage(MigratoryDataMessage message)
            {
                System.Console.WriteLine(message.ToString());
            }
            public void OnStatus(string status, string info)
            {
                System.Console.WriteLine(status + " " + info);
            }
        }
        class LogList : MigratoryDataLogListener
        {
            public void OnLog(string log, MigratoryDataLogLevel level)
            {
                string msg = string.Format("[{0:G}] [{1}] {2}", DateTime.Now, level, log);
                Console.WriteLine(msg);
            }
        }
    }
}
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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.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
6.0.10 107 9/18/2024
6.0.9 143 1/31/2024
6.0.8 326 10/6/2023
6.0.7 146 10/5/2023
6.0.6 157 9/29/2023
6.0.5 145 9/28/2023
6.0.4 251 3/6/2023
6.0.3 326 11/30/2022
6.0.2 320 11/30/2022
6.0.1 357 8/2/2021