Skip to content

Commit e3f3291

Browse files
authored
Add NServiceBus 10 version of the LearningTransport snippets (#7748)
* Add NServiceBus 10 version of the LearningTransport snippets * Move the file to the right place
1 parent 114baf0 commit e3f3291

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed
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" Version="10.0.0-alpha.3" />
7+
</ItemGroup>
8+
</Project>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using NServiceBus;
2+
3+
class Usage
4+
{
5+
Usage(EndpointConfiguration endpointConfiguration)
6+
{
7+
#region LearningTransport
8+
9+
endpointConfiguration.UseTransport<LearningTransport>();
10+
11+
#endregion
12+
}
13+
14+
void StorageDirectory(EndpointConfiguration endpointConfiguration)
15+
{
16+
#region StorageDirectory
17+
18+
var transport = endpointConfiguration.UseTransport<LearningTransport>();
19+
transport.StorageDirectory("PathToStoreTransportFiles");
20+
21+
#endregion
22+
}
23+
24+
void NoPayloadSizeRestriction(EndpointConfiguration endpointConfiguration)
25+
{
26+
#region NoPayloadSizeRestriction
27+
28+
var transport = endpointConfiguration.UseTransport<LearningTransport>();
29+
transport.NoPayloadSizeRestriction();
30+
31+
#endregion
32+
}
33+
}

Snippets/LearningTransport/Core_10/prerelease.txt

Whitespace-only changes.

Snippets/LearningTransport/LearningTransport.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}") = "Core_8", "Core_8\Core_8.csp
88
EndProject
99
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core_9", "Core_9\Core_9.csproj", "{6C93193D-176B-4AD6-A230-DCECC86DF87B}"
1010
EndProject
11+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core_10", "Core_10\Core_10.csproj", "{15181D7F-E506-44E8-B672-B3CB4BB7DA94}"
12+
EndProject
1113
Global
1214
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1315
Debug|Any CPU = Debug|Any CPU
@@ -26,6 +28,10 @@ Global
2628
{6C93193D-176B-4AD6-A230-DCECC86DF87B}.Debug|Any CPU.Build.0 = Debug|Any CPU
2729
{6C93193D-176B-4AD6-A230-DCECC86DF87B}.Release|Any CPU.ActiveCfg = Release|Any CPU
2830
{6C93193D-176B-4AD6-A230-DCECC86DF87B}.Release|Any CPU.Build.0 = Release|Any CPU
31+
{15181D7F-E506-44E8-B672-B3CB4BB7DA94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32+
{15181D7F-E506-44E8-B672-B3CB4BB7DA94}.Debug|Any CPU.Build.0 = Debug|Any CPU
33+
{15181D7F-E506-44E8-B672-B3CB4BB7DA94}.Release|Any CPU.ActiveCfg = Release|Any CPU
34+
{15181D7F-E506-44E8-B672-B3CB4BB7DA94}.Release|Any CPU.Build.0 = Release|Any CPU
2935
EndGlobalSection
3036
GlobalSection(SolutionProperties) = preSolution
3137
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)