Skip to content

Commit

Permalink
Merge pull request #33 from mauroservienti/revert-to-old-style
Browse files Browse the repository at this point in the history
Revert changes and remove the need for a configuration manager
  • Loading branch information
mauroservienti authored Dec 14, 2023
2 parents 545eede + 450d3aa commit 8555d64
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 212 deletions.
165 changes: 0 additions & 165 deletions src/Maddox.NServiceBus/EndpointConfigurationManager.cs

This file was deleted.

27 changes: 24 additions & 3 deletions src/Maddox.NServiceBus/LearningEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,34 @@

namespace Maddox.NServiceBus;

public class LearningEndpoint : NServiceBusEndpoint<LearningEndpointConfigurationManager, LearningTransport>
public class LearningEndpoint : NServiceBusEndpoint<LearningTransport>
{
public LearningEndpoint(IConfiguration configuration) : base(configuration)
public LearningEndpoint(IConfiguration configuration)
: base(configuration)
{
}

public LearningEndpoint(string endpointName, IConfiguration? configuration = null) : base(endpointName, configuration)
public LearningEndpoint(string endpointName, IConfiguration? configuration = null)
: base(endpointName, configuration)
{
}

protected override LearningTransport CreateTransport(IConfigurationSection? transportConfigurationSection)
{
LearningTransport transport = new();

ApplyCommonTransportSettings(transportConfigurationSection, transport);

if (transportConfigurationSection?["StorageDirectory"] is { } storageDirectory)
{
transport.StorageDirectory = storageDirectory;
}

if (transportConfigurationSection?["RestrictPayloadSize"] is { } restrictPayloadSize)
{
transport.RestrictPayloadSize = bool.Parse(restrictPayloadSize);
}

return transport;
}
}
25 changes: 0 additions & 25 deletions src/Maddox.NServiceBus/LearningEndpointConfigurationManager.cs

This file was deleted.

Loading

0 comments on commit 8555d64

Please sign in to comment.