From aa60d5836aa0ae147d37a96f8d982bb42ff8a947 Mon Sep 17 00:00:00 2001 From: Lilla Orban Date: Mon, 24 Jun 2024 17:54:02 +0200 Subject: [PATCH] fix(namespaces) - Fixing merge conflicts --- .../fdc3-appdirectory/apps-with-intents.json | 21 --- ...solverUiMessageRouterCommunicator.Tests.cs | 3 +- .../dotnet/src/Abstractions/IMessageBuffer.cs | 29 ++-- .../src/Abstractions/IMessagingService.cs | 147 +++++++++--------- src/shell/dotnet/Shell.sln | 7 + 5 files changed, 96 insertions(+), 111 deletions(-) diff --git a/examples/fdc3-appdirectory/apps-with-intents.json b/examples/fdc3-appdirectory/apps-with-intents.json index 86e225939..9b041318c 100644 --- a/examples/fdc3-appdirectory/apps-with-intents.json +++ b/examples/fdc3-appdirectory/apps-with-intents.json @@ -17,13 +17,6 @@ "interop": { "intents": { "listensFor": { - "ViewChart": { - "name": "ViewChart", - "displayName": "ViewChart", - "contexts": [ - "fdc3.instrument" - ] - } } } } @@ -51,13 +44,6 @@ "contexts": [ "fdc3.nothing" ] - }, - "ViewChart": { - "name": "ViewChart", - "displayName": "ViewChart", - "contexts": [ - "fdc3.instrument" - ] } }, "raises": {} @@ -87,13 +73,6 @@ "contexts": [ "fdc3.testContext" ] - }, - "ViewChart": { - "name": "ViewChart", - "displayName": "ViewChart", - "contexts": [ - "fdc3.instrument" - ] } }, "raises": {} diff --git a/src/fdc3/dotnet/DesktopAgent/test/MorganStanley.ComposeUI.DesktopAgent.Tests/Infrastructure/Internal/ResolverUiMessageRouterCommunicator.Tests.cs b/src/fdc3/dotnet/DesktopAgent/test/MorganStanley.ComposeUI.DesktopAgent.Tests/Infrastructure/Internal/ResolverUiMessageRouterCommunicator.Tests.cs index 9b4fec385..7001af96a 100644 --- a/src/fdc3/dotnet/DesktopAgent/test/MorganStanley.ComposeUI.DesktopAgent.Tests/Infrastructure/Internal/ResolverUiMessageRouterCommunicator.Tests.cs +++ b/src/fdc3/dotnet/DesktopAgent/test/MorganStanley.ComposeUI.DesktopAgent.Tests/Infrastructure/Internal/ResolverUiMessageRouterCommunicator.Tests.cs @@ -17,6 +17,7 @@ using MorganStanley.ComposeUI.Fdc3.DesktopAgent.Contracts; using MorganStanley.ComposeUI.Fdc3.DesktopAgent.Converters; using MorganStanley.ComposeUI.Fdc3.DesktopAgent.Infrastructure.Internal; +using MorganStanley.ComposeUI.Messaging.Abstractions; using AppMetadata = MorganStanley.ComposeUI.Fdc3.DesktopAgent.Protocol.AppMetadata; namespace MorganStanley.ComposeUI.Fdc3.DesktopAgent.Tests.Infrastructure.Internal; @@ -57,7 +58,7 @@ public async Task SendResolverUIRequest_will_return_response() It.IsAny(), It.IsAny(), It.IsAny())) - .Returns(ValueTask.FromResult( + .Returns(ValueTask.FromResult( MessageBuffer.Factory.CreateJson(new ResolverUIResponse() { AppMetadata = new AppMetadata(){ AppId = "testAppId" } diff --git a/src/messaging/dotnet/src/Abstractions/IMessageBuffer.cs b/src/messaging/dotnet/src/Abstractions/IMessageBuffer.cs index 669357e30..2b462069b 100644 --- a/src/messaging/dotnet/src/Abstractions/IMessageBuffer.cs +++ b/src/messaging/dotnet/src/Abstractions/IMessageBuffer.cs @@ -10,20 +10,19 @@ // or implied. See the License for the specific language governing permissions // and limitations under the License. -namespace MorganStanley.ComposeUI.Messaging.Abstractions +namespace MorganStanley.ComposeUI.Messaging.Abstractions; + +public interface IMessageBuffer { - public interface IMessageBuffer - { - /// - /// Gets the bytes of the underlying buffer as a - /// - /// - ReadOnlySpan GetSpan(); + /// + /// Gets the bytes of the underlying buffer as a + /// + /// + ReadOnlySpan GetSpan(); - /// - /// Gets the string value of the buffer. - /// - /// - string GetString(); - } -} + /// + /// Gets the string value of the buffer. + /// + /// + string GetString(); +} \ No newline at end of file diff --git a/src/messaging/dotnet/src/Abstractions/IMessagingService.cs b/src/messaging/dotnet/src/Abstractions/IMessagingService.cs index 8d358ee8a..51c8f2359 100644 --- a/src/messaging/dotnet/src/Abstractions/IMessagingService.cs +++ b/src/messaging/dotnet/src/Abstractions/IMessagingService.cs @@ -10,84 +10,83 @@ // or implied. See the License for the specific language governing permissions // and limitations under the License. -namespace MorganStanley.ComposeUI.Messaging.Abstractions +namespace MorganStanley.ComposeUI.Messaging.Abstractions; + +public interface IMessagingService : IAsyncDisposable { - public interface IMessagingService : IAsyncDisposable - { - /// - /// Gets the client ID of the current connection. - /// - /// - /// The returned value will be null if the client is not connected. - /// - string? ClientId { get; } + /// + /// Gets the client ID of the current connection. + /// + /// + /// The returned value will be null if the client is not connected. + /// + string? ClientId { get; } - /// - /// Asynchronously connects to the Message Router server endpoint. - /// - /// - /// - /// - /// Clients don't need to call this method before calling other methods on this type. - /// The client should automatically establish a connection when needed. - /// - ValueTask ConnectAsync(CancellationToken cancellationToken = default); + /// + /// Asynchronously connects to the Message Router server endpoint. + /// + /// + /// + /// + /// Clients don't need to call this method before calling other methods on this type. + /// The client should automatically establish a connection when needed. + /// + ValueTask ConnectAsync(CancellationToken cancellationToken = default); - /// - /// Gets an observable that represents a topic. - /// - /// - /// - /// - /// - ValueTask SubscribeAsync(string topic, - Func subscriber, - CancellationToken cancellationToken = default); + /// + /// Gets an observable that represents a topic. + /// + /// + /// + /// + /// + ValueTask SubscribeAsync(string topic, + Func subscriber, + CancellationToken cancellationToken = default); - /// - /// Publishes a message to a topic. - /// - /// - /// - /// - /// - /// - ValueTask PublishAsync(string topic, - IMessageBuffer? message = null, - PublishOptions optinos = default, - CancellationToken cancellationToken = default); + /// + /// Publishes a message to a topic. + /// + /// + /// + /// + /// + /// + ValueTask PublishAsync(string topic, + IMessageBuffer? message = null, + PublishOptions optinos = default, + CancellationToken cancellationToken = default); - /// - /// Registers a service by providing a name and handler. - /// - /// - /// - /// - /// - ValueTask RegisterServiceAsync(string endpoint, - Func> subscriber, - CancellationToken cancellationToken = default); + /// + /// Registers a service by providing a name and handler. + /// + /// + /// + /// + /// + ValueTask RegisterServiceAsync(string endpoint, + Func> subscriber, + CancellationToken cancellationToken = default); - /// - /// Removes a service registration. - /// - /// - /// - /// - ValueTask UnregisterServiceAsync(string endpoint, CancellationToken cancellationToken = default); + /// + /// Removes a service registration. + /// + /// + /// + /// + ValueTask UnregisterServiceAsync(string endpoint, CancellationToken cancellationToken = default); - /// - /// Invokes a named service. - /// - /// - /// - /// - /// - /// - ValueTask InvokeAsync( - string endpoint, - IMessageBuffer? payload = null, - InvokeOptions options = default, - CancellationToken cancellationToken = default); - } -} + /// + /// Invokes a named service. + /// + /// + /// + /// + /// + /// + ValueTask InvokeAsync( + string endpoint, + IMessageBuffer? payload = null, + InvokeOptions options = default, + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/src/shell/dotnet/Shell.sln b/src/shell/dotnet/Shell.sln index 64f25b434..57056cef2 100644 --- a/src/shell/dotnet/Shell.sln +++ b/src/shell/dotnet/Shell.sln @@ -53,6 +53,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{1944F009-EA2D-4D README.md = README.md EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MorganStanley.ComposeUI.Messaging.Abstractions", "..\..\messaging\dotnet\src\Abstractions\MorganStanley.ComposeUI.Messaging.Abstractions.csproj", "{F90449AE-B26E-42E0-873B-4F0CAE6FCD98}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -107,6 +109,10 @@ Global {24E64AFE-D2C5-487D-85F3-B0CE5AC0A128}.Debug|Any CPU.Build.0 = Debug|Any CPU {24E64AFE-D2C5-487D-85F3-B0CE5AC0A128}.Release|Any CPU.ActiveCfg = Release|Any CPU {24E64AFE-D2C5-487D-85F3-B0CE5AC0A128}.Release|Any CPU.Build.0 = Release|Any CPU + {F90449AE-B26E-42E0-873B-4F0CAE6FCD98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F90449AE-B26E-42E0-873B-4F0CAE6FCD98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F90449AE-B26E-42E0-873B-4F0CAE6FCD98}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F90449AE-B26E-42E0-873B-4F0CAE6FCD98}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -125,6 +131,7 @@ Global {24E64AFE-D2C5-487D-85F3-B0CE5AC0A128} = {DA1A43C4-F758-47E2-870A-7E5BBB946671} {B7A04459-C612-447F-9245-75DFAF23C31D} = {DA1A43C4-F758-47E2-870A-7E5BBB946671} {56F41D4A-5A4C-4F41-86CA-1B003992F083} = {DA1A43C4-F758-47E2-870A-7E5BBB946671} + {F90449AE-B26E-42E0-873B-4F0CAE6FCD98} = {E7A2C581-4BF4-47A5-8A11-59B2DEBADCA7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4C901E6C-4B9A-48C2-AB16-461040DC57B4}