Skip to content

Commit a9b7b84

Browse files
authored
Add NServiceBus 10 version of the Heartbeats snippets (#7746)
1 parent 8ab66bf commit a9b7b84

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

Snippets/Heartbeats/Heartbeats.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heartbeats_4", "Heartbeats_
88
EndProject
99
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heartbeats_5", "Heartbeats_5\Heartbeats_5.csproj", "{0676E1D2-97B2-4D94-93B6-8E01D1961C18}"
1010
EndProject
11+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Heartbeats_6", "Heartbeats_6\Heartbeats_6.csproj", "{2FE70BDD-8605-4FE7-AB12-D4B540BFB663}"
12+
EndProject
1113
Global
1214
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1315
Debug|Any CPU = Debug|Any CPU
@@ -26,6 +28,10 @@ Global
2628
{0676E1D2-97B2-4D94-93B6-8E01D1961C18}.Debug|Any CPU.Build.0 = Debug|Any CPU
2729
{0676E1D2-97B2-4D94-93B6-8E01D1961C18}.Release|Any CPU.ActiveCfg = Release|Any CPU
2830
{0676E1D2-97B2-4D94-93B6-8E01D1961C18}.Release|Any CPU.Build.0 = Release|Any CPU
31+
{2FE70BDD-8605-4FE7-AB12-D4B540BFB663}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32+
{2FE70BDD-8605-4FE7-AB12-D4B540BFB663}.Debug|Any CPU.Build.0 = Debug|Any CPU
33+
{2FE70BDD-8605-4FE7-AB12-D4B540BFB663}.Release|Any CPU.ActiveCfg = Release|Any CPU
34+
{2FE70BDD-8605-4FE7-AB12-D4B540BFB663}.Release|Any CPU.Build.0 = Release|Any CPU
2935
EndGlobalSection
3036
GlobalSection(SolutionProperties) = preSolution
3137
HideSolutionNode = FALSE
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using NServiceBus;
3+
4+
class MyClass
5+
{
6+
public void Configure_ServiceControl()
7+
{
8+
#region HeartbeatsNew_Enable
9+
10+
var endpointConfiguration = new EndpointConfiguration("MyEndpoint");
11+
endpointConfiguration.SendHeartbeatTo(
12+
serviceControlQueue: "ServiceControl_Queue",
13+
frequency: TimeSpan.FromSeconds(15),
14+
timeToLive: TimeSpan.FromSeconds(30));
15+
16+
#endregion
17+
}
18+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net10.0</TargetFramework>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<PackageReference Include="NServiceBus.Heartbeat" Version="6.0.0-alpha.2" />
7+
</ItemGroup>
8+
</Project>

Snippets/Heartbeats/Heartbeats_6/prerelease.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)