-
Notifications
You must be signed in to change notification settings - Fork 1
Fuck, wrong branch... Revert "Remove RelayTestServer project and non-x64 platform configurations from solution" #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,10 +15,10 @@ | |||||||||||||||||||
| using Microsoft.UI.Xaml; | ||||||||||||||||||||
| using Microsoft.UI.Xaml.Controls; | ||||||||||||||||||||
| using plugin_Relay.Models; | ||||||||||||||||||||
| using ActualLab.Rpc; | ||||||||||||||||||||
| using Stl.Rpc; | ||||||||||||||||||||
| using IServiceEndpoint = Amethyst.Plugins.Contract.IServiceEndpoint; | ||||||||||||||||||||
| using Microsoft.AspNetCore.Builder; | ||||||||||||||||||||
| using ActualLab.Rpc.Server; | ||||||||||||||||||||
| using Stl.Rpc.Server; | ||||||||||||||||||||
| using MemoryPack; | ||||||||||||||||||||
| using Microsoft.Extensions.Logging; | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
@@ -209,6 +209,18 @@ public int Initialize() | |||||||||||||||||||
| rpc.AddServer<IRelayService, DataService>() | ||||||||||||||||||||
| .AddClient<IRelayClient>(); | ||||||||||||||||||||
|
|
||||||||||||||||||||
| builder.Services.AddSingleton<RpcCallRouter>(c => | ||||||||||||||||||||
| { | ||||||||||||||||||||
| RpcHub rpcHub = null; // Necessary because of IRelayClient, which requires call routing | ||||||||||||||||||||
| return (methodDef, args) => | ||||||||||||||||||||
| { | ||||||||||||||||||||
| rpcHub ??= c.RpcHub(); // We can't resolve it earlier, coz otherwise it will trigger recursion | ||||||||||||||||||||
| if (methodDef.Service.Type != typeof(IRelayClient)) return rpcHub.GetClientPeer(RpcPeerRef.Default); | ||||||||||||||||||||
| var peerRef = new RpcPeerRef(args.Get<Stl.Text.Symbol>(0), true); | ||||||||||||||||||||
| return rpcHub.GetServerPeer(peerRef); | ||||||||||||||||||||
|
Comment on lines
+218
to
+220
|
||||||||||||||||||||
| if (methodDef.Service.Type != typeof(IRelayClient)) return rpcHub.GetClientPeer(RpcPeerRef.Default); | |
| var peerRef = new RpcPeerRef(args.Get<Stl.Text.Symbol>(0), true); | |
| return rpcHub.GetServerPeer(peerRef); | |
| if (methodDef.Service.Type != typeof(IRelayClient)) | |
| return rpcHub.GetClientPeer(RpcPeerRef.Default); | |
| // For IRelayClient calls, route using the default peer reference instead of | |
| // assuming the first argument is a Stl.Text.Symbol peer identifier. | |
| return rpcHub.GetServerPeer(RpcPeerRef.Default); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,17 +24,13 @@ | |
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="ActualLab.Generators" Version="12.1.51"> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| </PackageReference> | ||
| <PackageReference Include="ActualLab.Rpc" Version="12.1.51" /> | ||
| <PackageReference Include="ActualLab.Rpc.Server" Version="12.1.51" /> | ||
| <PackageReference Include="Amethyst.Plugins.Contract" Version="1.3.0" /> | ||
| <PackageReference Include="MemoryPack" Version="1.21.4" /> | ||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" /> | ||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" /> | ||
| <PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" /> | ||
| <PackageReference Include="Stl.Generators" Version="6.8.11" /> | ||
| <PackageReference Include="Stl.Rpc" Version="6.8.11" /> | ||
| <PackageReference Include="Stl.Rpc.Server" Version="6.8.11" /> | ||
|
Comment on lines
26
to
+33
|
||
| <PackageReference Include="System.ComponentModel.Composition" Version="8.0.0" /> | ||
| <PackageReference Include="System.ComponentModel.Composition.Registration" Version="8.0.0" /> | ||
| <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.250606001" /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.AddConsole()requires theMicrosoft.Extensions.Logging.Consoleassembly/package; this project file currently has no explicit reference to it. Either add the appropriate package reference or remove.AddConsole()(fall back to.AddLogging()or the existing logging provider setup) to avoid a missing-method/compile error depending on transitive dependencies.