Skip to content

Commit

Permalink
Removed unused private Interface property.
Browse files Browse the repository at this point in the history
  • Loading branch information
theRainbird committed Jul 20, 2021
1 parent 8987f97 commit 92ba17d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 24 deletions.
6 changes: 3 additions & 3 deletions CoreRemoting.Tests/CoreRemoting.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PackageReference Include="coverlet.collector" Version="3.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
4 changes: 0 additions & 4 deletions CoreRemoting.Tests/RemotingConfigurationTests.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
using System;
using System.IO;
using System.Net;
using System.Reflection;
using System.Threading;
using Castle.DynamicProxy.Generators.Emitters.SimpleAST;
using CoreRemoting.Authentication;
using CoreRemoting.Channels.Websocket;
using CoreRemoting.ClassicRemotingApi;
using CoreRemoting.DependencyInjection;
using CoreRemoting.Serialization.Binary;
using CoreRemoting.Serialization.Bson;
using CoreRemoting.Tests.Tools;
using Xunit;

Expand Down
10 changes: 5 additions & 5 deletions CoreRemoting.Tests/RpcTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void Call_on_Proxy_should_be_invoked_on_remote_service()
int serverErrorCount = 0;

using var server = new RemotingServer(serverConfig);
server.Error += (sender, e) => serverErrorCount++;
server.Error += (_, _) => serverErrorCount++;
server.Start();

void ClientAction()
Expand Down Expand Up @@ -109,7 +109,7 @@ public void Call_on_Proxy_should_be_invoked_on_remote_service_without_MessageEnc
int serverErrorCount = 0;

using var server = new RemotingServer(serverConfig);
server.Error += (sender, e) => serverErrorCount++;
server.Error += (_, _) => serverErrorCount++;
server.Start();

void ClientAction()
Expand Down Expand Up @@ -165,7 +165,7 @@ public void Delegate_invoked_on_server_should_callback_client()
int serverErrorCount = 0;

using var server = new RemotingServer(serverConfig);
server.Error += (sender, e) => serverErrorCount++;
server.Error += (_, _) => serverErrorCount++;
server.Start();

void ClientAction()
Expand Down Expand Up @@ -218,7 +218,7 @@ public void Events_should_work_remotly()
bool serviceEventCalled = false;

using var server = new RemotingServer(serverConfig);
server.Error += (sender, e) => serverErrorCount++;
server.Error += (_, _) => serverErrorCount++;
server.Start();

using var client = new RemotingClient(
Expand Down Expand Up @@ -270,7 +270,7 @@ public void External_types_should_work_as_remote_service_parameters()
int serverErrorCount = 0;

using var server = new RemotingServer(serverConfig);
server.Error += (sender, e) => serverErrorCount++;
server.Error += (_, _) => serverErrorCount++;
server.Start();

void ClientAction()
Expand Down
2 changes: 1 addition & 1 deletion CoreRemoting.Tests/SessionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void Client_Connect_should_throw_exception_on_invalid_auth_credentials()
int serverErrorCount = 0;

using var server = new RemotingServer(serverConfig);
server.Error += (sender, e) => serverErrorCount++;
server.Error += (_, _) => serverErrorCount++;
server.Start();

var clientAction = new Action<string, bool>((password, shouldThrow) =>
Expand Down
11 changes: 0 additions & 11 deletions CoreRemoting/ServiceProxy.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using Castle.DynamicProxy;
Expand Down Expand Up @@ -32,9 +31,6 @@ public ServiceProxy(RemotingClient client, string serviceName = "")
string.IsNullOrWhiteSpace(serviceName)
? serviceInterfaceType.FullName
: serviceName;

Interface =
(TServiceInterface)_client.ProxyGenerator.CreateInterfaceProxyWithoutTarget(typeof (TServiceInterface), this);
}

/// <summary>
Expand All @@ -59,13 +55,6 @@ void IServiceProxy.Shutdown()
GC.SuppressFinalize(this);
}

/// <summary>
/// Gets or sets the interface type of the proxied remote service.
/// </summary>
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Local")]
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Local")]
private TServiceInterface Interface { get; set; }

/// <summary>
/// Intercepts a call of a member on the proxy object.
/// </summary>
Expand Down

0 comments on commit 92ba17d

Please sign in to comment.