Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
8d9c876
Using file-scoped namespaces.
yallie Sep 15, 2026
5f790f4
Added EventStub.Invoke(string, args) method.
yallie Sep 16, 2026
88c05ba
Hidden system service shouldn't be remotely callable.
yallie Sep 16, 2026
0c840ac
Refactored EventStore class to use external EventStub instance.
yallie Oct 12, 2026
580f5e4
Make sure that IDependencyInjectionContainer is registered in itself …
yallie Oct 13, 2026
8b1b801
Fixed DryIocContainerAdapter.IsRegistered method implementation relat…
yallie Oct 13, 2026
c2b6e71
Added hidden server-side event dispatcher service.
yallie Oct 14, 2026
fb8f9a6
Added more unit tests for the event dispatcher service.
yallie Oct 14, 2026
818cbc6
Added ClientDelegateInfo.HandlerKey, added unit tests for the client …
yallie Oct 15, 2026
7f05b7d
Added reverse index for faster lookup, fixed a race condition.
yallie Oct 15, 2026
fc3dd10
Added simple subscription tracker with tests.
yallie Oct 16, 2026
38cb53a
Added unit tests for the multicast event semantics.
yallie Oct 16, 2026
5c6fe1a
Added a unit test demonstrating the bug with client event handler reg…
yallie Oct 16, 2026
0e8fa88
Removed unused delegate registry methods, fixed #244.
yallie Oct 16, 2026
a3deb1e
Extracted event-related unit tests to RpcTests_Events.cs file.
yallie Oct 16, 2026
e60362e
Implemented event subscriptions tracking on client and server.
yallie Oct 17, 2026
c62d70f
Added a failing unit test for issue #245 (currently skipped).
yallie Oct 17, 2026
2e6fa13
BeforeCall event handler can cancel method call.
yallie Oct 19, 2026
cb81bb8
Added ServerRpcContext.ReturnValue so that AfterCall handler could re…
yallie Oct 19, 2026
c127b50
New unit test: subscription trackers can detect out of sync subscript…
yallie Oct 19, 2026
59d54a4
Converted ServiceProxy argument mapping methods into extension methods.
yallie Oct 20, 2026
5039af8
Added IServiceInvoker: a tool to invoke methods without creating a pr…
yallie Oct 20, 2026
6d81169
JustWait<T> extension method return type should be T rather than void.
yallie Oct 20, 2026
604c5b5
Added proxiless ServiceInvoker for internal/private interfaces that C…
yallie Oct 20, 2026
daf4e06
Renamed EventStub to ServiceEventHub, updated related unit tests.
yallie Oct 21, 2026
23cf086
Added handler keys and sessionId to the ServiceEventHub delegate entr…
yallie Oct 21, 2026
38e3fc5
Added unit tests for the DelegateProxy and DelegateProxyFactory.
yallie Oct 21, 2026
3fd94da
Added failing unit tests for the current delegate proxy builder issues.
yallie Oct 22, 2026
93b52f5
Fixed minor issues in dynamic method builder, enabled skipped unit te…
yallie Oct 22, 2026
b125a05
Added a few skipped tests for the planned dynamic method caching feat…
yallie Oct 22, 2026
2551d02
Moved DynamicMethod builder from DelegateProxy to DelegateProxyFactor…
yallie Oct 22, 2026
53f76a0
Replaced static ServiceEventHub.GetHandlerCount method with an instan…
yallie Oct 22, 2026
3c4b233
Disconnecting a client removes all its subscriptions on server.
yallie Oct 22, 2026
4366aa0
Avoid potential deadlock related to currently processed message counter.
yallie Oct 22, 2026
819bf15
Added AtomicBool primitive to fix race condition in RemotingSession.D…
yallie Oct 22, 2026
d1023ae
Using AtomicBool in RemotingClient instead of non-threadsafe boolean …
yallie Oct 22, 2026
17ce896
Added IServerSubscriptionService.RemoveHandlers method to be called o…
yallie Oct 23, 2026
1c1f8ed
ClientDelegateRegistry.UnregisterClientDelegatesOfServiceProxy return…
yallie Oct 23, 2026
9022d72
Implemented RemotingClient.ScheduleServerUnsubscribe method for the p…
yallie Oct 23, 2026
57a6277
Scheduled server-side unsubscription when an unknown event handler is…
yallie Oct 23, 2026
a02d448
Added ShutdownProxyAsync, implemented batch unsubscription on proxy s…
yallie Oct 23, 2026
78a57c5
Added IDelegateProxy.IsDisposed and delegate.IsDisposed() extension m…
yallie Oct 23, 2026
4c2e26b
Fixed broken unit tests using default TestService singletons.
yallie Oct 23, 2026
6535ce9
Updated CodeQL action version, enabled nuget cache, added blame-hang …
yallie Oct 23, 2026
4f3f138
Added missing namespaces.
yallie Oct 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -65,7 +65,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v4

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -79,4 +79,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
17 changes: 15 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- os: ${{ !contains(github.event.head_commit.message, 'windows') && !github.event.pull_request && 'windows-latest' }}

runs-on: ${{ matrix.os }}
timeout-minutes: 20
timeout-minutes: 30

steps:
- name: Checkout source
Expand All @@ -38,6 +38,8 @@ jobs:
dotnet-version: |
8.0.x
9.0.x
cache: true
cache-dependency-path: '**/*.csproj'

- name: Install libmsquic (Linux)
if: runner.os == 'Linux'
Expand All @@ -53,7 +55,18 @@ jobs:
run: dotnet build --no-restore

- name: Test
run: dotnet test --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx"
run: dotnet test --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx" --blame-hang-timeout 180s --blame-hang-dump-type mini

- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}
path: |
**/TestResults/**/*.trx
**/TestResults/**/*.dmp
retention-days: 3
if-no-files-found: warn

- name: Update Pantry badge
if: always() && github.event_name == 'push'
Expand Down
6 changes: 4 additions & 2 deletions CoreRemoting.Tests/CoreRemoting.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
<!-- WatsonTcp is the default channel, WebSocketSharp is optional, BinaryFormatter is .net8 only, Quic is .net9 only -->
<ItemGroup>
<Compile Remove="BinarySerializationTests.cs" />
<Compile Remove="InvokerTests.cs" />
<Compile Remove="InvokerTestsSafe.cs" />
<Compile Remove="RpcTests_Quic.cs" />
<Compile Remove="RpcTests_WatsonTcp.cs" />
<Compile Remove="RpcTests_WebsocketSharp.cs" />
Expand All @@ -24,6 +22,7 @@
<!-- .NET 8.0 only: include BinaryFormatter and a small bunch of other tests -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<Compile Remove="*.cs" />
<Compile Remove="RemoteDelegates/EventDispatcherTests*.cs" />
<Compile Include="BinarySerializationTests.cs" />
<Compile Include="SourceGeneratorTests.cs" />
</ItemGroup>
Expand Down Expand Up @@ -79,6 +78,9 @@
<Compile Update="DicTests_*.cs">
<DependentUpon>DicTests.cs</DependentUpon>
</Compile>
<Compile Update="EventDispatcherTests_*.cs">
<DependentUpon>EventDispatcherTests.cs</DependentUpon>
</Compile>
<Compile Update="RpcTests_*.cs">
<DependentUpon>RpcTests.cs</DependentUpon>
</Compile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
namespace CoreRemoting.Tests;

[Collection("CoreRemoting")]
public class InvokerTests : IClassFixture<ServerFixture>, IDisposable
public class DelegateInvokerTests : IClassFixture<ServerFixture>, IDisposable
{
private readonly ServerFixture _serverFixture;
private readonly ITestOutputHelper _testOutputHelper;

public InvokerTests(ServerFixture serverFixture, ITestOutputHelper testOutputHelper)
public DelegateInvokerTests(ServerFixture serverFixture, ITestOutputHelper testOutputHelper)
{
EventStub.DelegateInvoker = DelegateInvoker;
ServiceEventHub.DelegateInvoker = DelegateInvoker;

_serverFixture = serverFixture;
_testOutputHelper = testOutputHelper;
Expand Down Expand Up @@ -102,6 +102,6 @@ public async Task Event_order_depends_on_the_delegate_invoker()
public void Dispose()
{
// reset the invoker to default
EventStub.DelegateInvoker = null;
ServiceEventHub.DelegateInvoker = null;
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
using CoreRemoting.RemoteDelegates;
using CoreRemoting.Threading;
using Xunit.Abstractions;

namespace CoreRemoting.Tests;

public class InvokerTestsSafe : InvokerTests
public class DelegateInvokerTestsSafe : DelegateInvokerTests
{
public InvokerTestsSafe(ServerFixture serverFixture, ITestOutputHelper testOutputHelper) : base(serverFixture, testOutputHelper)
public DelegateInvokerTestsSafe(ServerFixture serverFixture, ITestOutputHelper testOutputHelper) : base(serverFixture, testOutputHelper)
{
}

Expand Down
48 changes: 48 additions & 0 deletions CoreRemoting.Tests/DicTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,52 @@ void RegisterFactory()
Console.WriteLine($"Registration threads: {t.Keys.Count}");
Assert.True(t.Count > 1);
}

[Fact]
public void Container_resolves_itself()
{
var c = Container;

var resolved = c.GetService<IDependencyInjectionContainer>();
Assert.NotNull(resolved);
Assert.Same(c, resolved);
}

[Fact]
public void Container_can_be_injected_into_service()
{
var c = Container;
c.RegisterService<IServiceWithContainer, ServiceWithContainer>(ServiceLifetime.SingleCall);

var svc = c.GetService<IServiceWithContainer>();
Assert.NotNull(svc);
Assert.Same(c, svc.Container);
}

[Fact]
public void Injected_container_exposes_service_registrations()
{
var c = Container;
c.RegisterService<ITestService, TestService>(ServiceLifetime.Singleton);
c.RegisterService<IServiceWithContainer, ServiceWithContainer>(ServiceLifetime.SingleCall);

Assert.True(c.IsRegistered<ITestService>());
Assert.True(c.IsRegistered<IServiceWithContainer>());

var svc = c.GetService<IServiceWithContainer>();
Assert.NotNull(svc);
Assert.Same(c, svc.Container);

// verify that injected container can resolve other service registration
Assert.True(svc.Container.IsRegistered<ITestService>());

var registration = svc.Container.GetServiceRegistration(typeof(ITestService).FullName);
Assert.NotNull(registration);

var ifaceType = svc.Container.GetServiceInterfaceType(typeof(ITestService).FullName);
Assert.Equal(typeof(ITestService), ifaceType);

var all = svc.Container.GetServiceRegistrations().ToList();
Assert.Contains(all, r => r.ServiceName == typeof(ITestService).FullName);
}
}
1 change: 1 addition & 0 deletions CoreRemoting.Tests/Encryption/HkdfTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using CoreRemoting.Encryption;
using Xunit;

namespace CoreRemoting.Tests.Encryption;
Expand Down
Loading
Loading