Skip to content

Commit

Permalink
Fix IDE1515
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek committed Oct 30, 2024
1 parent e626ada commit 4d7811f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace OpenTelemetry.Instrumentation.Wcf.Tests.Tools;

public class DownstreamInstrumentationBindingElement : BindingElement
internal class DownstreamInstrumentationBindingElement : BindingElement
{
public override BindingElement Clone()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

namespace OpenTelemetry.Instrumentation.Wcf.Tests.Tools;

public class DownstreamInstrumentationChannel : DispatchProxy
internal class DownstreamInstrumentationChannel : DispatchProxy
{
public const string DownstreamInstrumentationSourceName = "DownstreamInstrumentationSource";
private static readonly ActivitySource DownstreamInstrumentationSource = new ActivitySource(DownstreamInstrumentationSourceName);
private static readonly ActivitySource DownstreamInstrumentationSource = new(DownstreamInstrumentationSourceName);
private static bool failNextReceive;

private object? Target { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,14 @@

namespace OpenTelemetry.Instrumentation.Wcf.Tests.Tools;

public class DownstreamInstrumentationChannelFactory<TChannel> : DispatchProxy
internal class DownstreamInstrumentationChannelFactory<TChannel> : DispatchProxy
where TChannel : notnull
{
public IChannelFactory<TChannel>? Target { get; set; }

protected override object? Invoke(MethodInfo? targetMethod, object?[]? args)
{
var returnValue = targetMethod!.Invoke(this.Target, args);
if (targetMethod.Name == nameof(IChannelFactory<TChannel>.CreateChannel))
{
return DownstreamInstrumentationChannel.Create((TChannel)returnValue!);
}

return returnValue;
return targetMethod.Name == nameof(IChannelFactory<TChannel>.CreateChannel) ? DownstreamInstrumentationChannel.Create((TChannel)returnValue!) : returnValue;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace OpenTelemetry.Instrumentation.Wcf.Tests.Tools;

public class DownstreamInstrumentationEndpointBehavior : IEndpointBehavior
internal class DownstreamInstrumentationEndpointBehavior : IEndpointBehavior
{
public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace OpenTelemetry.Instrumentation.Wcf.Tests;

[ServiceContract(Namespace = "http://opentelemetry.io/", Name = "Service", SessionMode = SessionMode.Allowed)]
public interface IServiceContract
internal interface IServiceContract
{
[OperationContract]
Task<ServiceResponse> ExecuteAsync(ServiceRequest request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace OpenTelemetry.Instrumentation.Wcf.Tests;
InstanceContextMode = InstanceContextMode.Single,
UseSynchronizationContext = false,
Name = "Service")]
public class Service : IServiceContract
internal class Service : IServiceContract
{
public Task ErrorAsync()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace OpenTelemetry.Instrumentation.Wcf.Tests;

public class ServiceClient : ClientBase<IServiceContract>, IServiceContract
internal class ServiceClient : ClientBase<IServiceContract>, IServiceContract
{
public ServiceClient(Binding binding, EndpointAddress remoteAddress)
: base(binding, remoteAddress)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace OpenTelemetry.Instrumentation.Wcf.Tests;

[DataContract]
public class ServiceRequest
internal class ServiceRequest
{
public ServiceRequest(string payload)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace OpenTelemetry.Instrumentation.Wcf.Tests;

[DataContract]
public class ServiceResponse
internal class ServiceResponse
{
public ServiceResponse(string payload)
{
Expand Down

0 comments on commit 4d7811f

Please sign in to comment.