Skip to content

Commit

Permalink
added RoutingTable to configs
Browse files Browse the repository at this point in the history
  • Loading branch information
janzenisek committed Feb 1, 2024
1 parent 23a60ca commit 8aea5dd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/Configuration/Configuration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ai.Hgb.Common.Entities" Version="0.1.2-prerelease-gb09de19d6b" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageReference Include="YamlDotNet" Version="13.1.1" />
</ItemGroup>
Expand Down
14 changes: 4 additions & 10 deletions src/Configuration/Configurations/BrokerConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
using Ai.Hgb.Dat.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using Ai.Hgb.Common.Entities;
using Ai.Hgb.Dat.Utils;

namespace Ai.Hgb.Dat.Configuration {
public class BrokerConfiguration : IConfiguration {
Expand All @@ -22,7 +16,7 @@ public class BrokerConfiguration : IConfiguration {
public string BaseTopic { get; set; }
public string PayloadType { get; set; }

//public RoutingTable Routing { get; set; }
public RoutingTable Routing { get; set; }

public BrokerConfiguration() {

Check warning on line 21 in src/Configuration/Configurations/BrokerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Build, Test and (Publish if not pull request) 7.0.x

Non-nullable property 'Type' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 21 in src/Configuration/Configurations/BrokerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Build, Test and (Publish if not pull request) 7.0.x

Non-nullable property 'Url' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 21 in src/Configuration/Configurations/BrokerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Build, Test and (Publish if not pull request) 7.0.x

Non-nullable event 'ConfigurationChanged' must contain a non-null value when exiting constructor. Consider declaring the event as nullable.

Check warning on line 21 in src/Configuration/Configurations/BrokerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Build, Test and (Publish if not pull request) 7.0.x

Non-nullable property 'Name' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 21 in src/Configuration/Configurations/BrokerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Build, Test and (Publish if not pull request) 7.0.x

Non-nullable property 'Id' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 21 in src/Configuration/Configurations/BrokerConfiguration.cs

View workflow job for this annotation

GitHub Actions / Build, Test and (Publish if not pull request) 7.0.x

Non-nullable property 'Address' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Expand Down Expand Up @@ -53,7 +47,7 @@ public object Clone() {
c.BaseTopic = BaseTopic;
c.PayloadType = PayloadType;

//c.Routing = (RoutingTable)Routing.Clone();
c.Routing = (RoutingTable)Routing.Clone();

return c;
}
Expand Down
7 changes: 4 additions & 3 deletions src/Configuration/Configurations/SocketConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Ai.Hgb.Dat.Utils;
using Ai.Hgb.Common.Entities;
using Ai.Hgb.Dat.Utils;

namespace Ai.Hgb.Dat.Configuration {
public class SocketConfiguration : IConfiguration {
Expand Down Expand Up @@ -28,7 +29,7 @@ public class SocketConfiguration : IConfiguration {

public RequestOptions DefaultRequestOptions { get; set; }

//public RoutingTable Routing { get; set; }
public RoutingTable Routing { get; set; }

public SocketConfiguration() {
DefaultPublicationOptions = new PublicationOptions();
Expand All @@ -53,7 +54,7 @@ public object Clone() {
c.DefaultSubscriptionOptions = (SubscriptionOptions)DefaultSubscriptionOptions.Clone();
c.DefaultRequestOptions = (RequestOptions)DefaultRequestOptions.Clone();

//c.Routing = (RoutingTable)Routing.Clone();
c.Routing = (RoutingTable)Routing.Clone();

return c;
}
Expand Down

0 comments on commit 8aea5dd

Please sign in to comment.