Skip to content

Commit c26fab1

Browse files
committed
update examples
1 parent b4ae478 commit c26fab1

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

examples/local-node-uptime/Program.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: MIT
33

44
using System;
5+
using System.Net;
56
using System.Threading;
67

78
using Microsoft.Extensions.DependencyInjection;
@@ -54,10 +55,11 @@
5455
);
5556

5657
// Create LocalNode
57-
await using var node = new LocalNode(
58+
await using var node = LocalNode.Create(
5859
plugins: plugins,
59-
hostName: NodeHostName,
6060
port: NodePort,
61+
hostName: NodeHostName,
62+
addressListAllowFrom: [IPAddress.Loopback, IPAddress.IPv6Loopback],
6163
serviceProvider: services.BuildServiceProvider()
6264
);
6365

examples/local-node-uptime/local-node-uptime.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ SPDX-License-Identifier: MIT
55
<Project Sdk="Microsoft.NET.Sdk">
66
<PropertyGroup>
77
<OutputType>Exe</OutputType>
8-
<TargetFramework>net6.0</TargetFramework>
8+
<TargetFramework>net8.0</TargetFramework>
99
</PropertyGroup>
1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
12-
<PackageReference Include="Smdn.Net.MuninNode" Version="1.2.0" />
11+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
12+
<PackageReference Include="Smdn.Net.MuninNode" Version="2.0.0" />
1313
</ItemGroup>
1414
</Project>

examples/multiple-fields/Program.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: MIT
33

44
using System;
5+
using System.Net;
56
using System.Threading;
67

78
using Microsoft.Extensions.DependencyInjection;
@@ -43,10 +44,11 @@
4344
.AddFilter(static level => LogLevel.Trace <= level)
4445
);
4546

46-
await using var node = new LocalNode(
47+
await using var node = LocalNode.Create(
4748
plugins: plugins,
48-
hostName: NodeHostName,
4949
port: NodePort,
50+
hostName: NodeHostName,
51+
addressListAllowFrom: [IPAddress.Loopback, IPAddress.IPv6Loopback],
5052
serviceProvider: services.BuildServiceProvider()
5153
);
5254

examples/multiple-fields/multiple-fields.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ SPDX-License-Identifier: MIT
55
<Project Sdk="Microsoft.NET.Sdk">
66
<PropertyGroup>
77
<OutputType>Exe</OutputType>
8-
<TargetFramework>net6.0</TargetFramework>
8+
<TargetFramework>net8.0</TargetFramework>
99
</PropertyGroup>
1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
12-
<PackageReference Include="Smdn.Net.MuninNode" Version="1.2.0" />
11+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
12+
<PackageReference Include="Smdn.Net.MuninNode" Version="2.0.0" />
1313
</ItemGroup>
1414
</Project>

0 commit comments

Comments
 (0)