From 2eb3bb1f05d96a3d4a207ecc79aa0f9be07a6630 Mon Sep 17 00:00:00 2001 From: Ryland Degnan Date: Sun, 7 Jul 2019 14:37:35 -0700 Subject: [PATCH] Add method to register service --- Netifi.Broker.Client/BrokerClient.cs | 6 ++++++ Netifi.Broker.Client/Netifi.Broker.Client.csproj | 4 ++++ Netifi.Broker.Idl/Netifi.Broker.Idl.csproj | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Netifi.Broker.Client/BrokerClient.cs b/Netifi.Broker.Client/BrokerClient.cs index a84787b..8330ec1 100644 --- a/Netifi.Broker.Client/BrokerClient.cs +++ b/Netifi.Broker.Client/BrokerClient.cs @@ -6,6 +6,7 @@ using System.Threading; using System.Threading.Tasks; using RSocket; +using RSocket.RPC; namespace Netifi.Broker.Client { @@ -66,6 +67,11 @@ public async Task ConnectAsync() await client.ConnectAsync(options, metadata: writeSetupMetadata()); } + public void AddService(IRSocketService service) + { + RSocketService.Register(client, service); + } + public RSocket.RSocket Group(string group, SortedDictionary tags = default) { return new BrokerSocket(client, metadata => diff --git a/Netifi.Broker.Client/Netifi.Broker.Client.csproj b/Netifi.Broker.Client/Netifi.Broker.Client.csproj index 9711420..5dc05d7 100644 --- a/Netifi.Broker.Client/Netifi.Broker.Client.csproj +++ b/Netifi.Broker.Client/Netifi.Broker.Client.csproj @@ -9,4 +9,8 @@ + + + + diff --git a/Netifi.Broker.Idl/Netifi.Broker.Idl.csproj b/Netifi.Broker.Idl/Netifi.Broker.Idl.csproj index 1338a54..bc4b7c6 100644 --- a/Netifi.Broker.Idl/Netifi.Broker.Idl.csproj +++ b/Netifi.Broker.Idl/Netifi.Broker.Idl.csproj @@ -12,7 +12,7 @@ all runtime; build; native; contentfiles; analyzers - +