ServiceDisc 1.2.0

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

// Install ServiceDisc as a Cake Tool
#tool nuget:?package=ServiceDisc&version=1.2.0                

ServiceDisc

ServiceDisc is a library for hosting and communicating between services. Service discovery is done through a common data collection. Each service will register in the collection when it's hosted to make it a simple process to reach it.

ServiceDisc requires common storage between clients and services. Currently Azure Storage is implemented, and in-memory storage for testing. Other storage can be implemented using the IServiceDiscConnection interface which requires methods to register/unregister services and to send/receive queue messages.

There are two methods of communicating between services. Web API which will create a Web API controller to host the services, and a queue service which will listen to other services and reply through message queues. Queue service is default, this can be updated through the ServiceDiscClient.ServiceHostFactory property (setting it to WebApiServiceHostFactory will host the services with Web API instead).

Installing from NuGet

Install-Package ServiceDisc

Example

// Create a client, used for hosting and connecting to services.
// Pass an instance of AzureStorageServiceDiscConnection to store services in Azure,
// to enable having clients and services on different computers.
var serviceDisc = new ServiceDiscClient();

// Create an instance of a class to host as a service.
var helloService = new HelloService();

// Host the service and register it in the ServiceDisc.
// The service will now be known to other clients with the same IServiceDiscConnection
await serviceDisc.HostAsync<IHelloService>(helloService);

// Create a client for communicating with the IHelloService.
// This operation will search the common storage for services implementing IHelloService
// and create a proxy class to communicate with it.
var helloServiceClient = await serviceDisc.GetAsync<IHelloService>(serviceName);

// Send and receive a message from the service.
var world = helloServiceClient.Hello();
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.

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.2.0 1,027 9/8/2018
1.1.1 870 8/30/2018
1.1.0 919 8/26/2018
1.0.1 1,067 4/23/2018
1.0.0 1,040 3/20/2018