Skip to content

Commit e4c3777

Browse files
committed
Merge branch 'release-3.0.0'
2 parents c59dfd7 + 6f35325 commit e4c3777

14 files changed

+78
-105
lines changed

GitVersion.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
assembly-versioning-scheme: Major
2-
next-version: 1.0.0
3-
commit-message-incrementing: Disabled
2+
next-version: 1.0
43
branches:
54
develop:
6-
tag: alpha
5+
tag: alpha
6+
release:
7+
tag: rc

packaging/nuget/nservicebus.metrics.servicecontrol.msmq.nuspec

-23
This file was deleted.

src/Directory.Build.props

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<LangVersion>latest</LangVersion>
5+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
6+
</PropertyGroup>
7+
8+
</Project>

src/NServiceBus.Metrics.ServiceControl..Msmq.Tests/APIApprovals.Approve.approved.cs

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
using System;
2-
using System.IO;
3-
using System.Linq;
4-
using System.Reflection;
5-
using System.Runtime.CompilerServices;
6-
using ApprovalTests;
7-
using ApprovalTests.Core;
1+
using System.Runtime.CompilerServices;
2+
using NServiceBus.Metrics.ServiceControl.Msmq.Tests;
83
using NUnit.Framework;
94
using PublicApiGenerator;
105

@@ -15,40 +10,7 @@ public class APIApprovals
1510
[MethodImpl(MethodImplOptions.NoInlining)]
1611
public void Approve()
1712
{
18-
var combine = Path.Combine(TestContext.CurrentContext.TestDirectory, "NServiceBus.Metrics.ServiceControl.Msmq.dll");
19-
var assembly = Assembly.LoadFile(combine);
20-
var publicApi = Filter(ApiGenerator.GeneratePublicApi(assembly));
21-
Approvals.Verify(BuildWriter(publicApi));
22-
}
23-
24-
static IApprovalWriter BuildWriter(string api,[CallerFilePath] string path = null)
25-
{
26-
var directory = Path.GetDirectoryName(path);
27-
return new LocalApprovalTextWriter(api, "cs", directory);
28-
}
29-
30-
string Filter(string text)
31-
{
32-
return string.Join(Environment.NewLine, text.Split(new[]
33-
{
34-
Environment.NewLine
35-
}, StringSplitOptions.RemoveEmptyEntries)
36-
.Where(l => !l.StartsWith("[assembly: System.Runtime.Versioning"))
37-
.Where(l => !string.IsNullOrWhiteSpace(l))
38-
);
39-
}
40-
41-
class LocalApprovalTextWriter : ApprovalTextWriter
42-
{
43-
readonly string directory;
44-
45-
public LocalApprovalTextWriter(string data, string extensionWithoutDot, string directory)
46-
: base(data, extensionWithoutDot)
47-
{
48-
this.directory = directory;
49-
}
50-
51-
public override string GetApprovalFilename(string basename) => Path.Combine(directory, base.GetApprovalFilename(basename));
52-
public override string GetReceivedFilename(string basename) => Path.Combine(directory, base.GetReceivedFilename(basename));
13+
var publicApi = ApiGenerator.GeneratePublicApi(typeof(MsmqNativeQueueLengthReporter).Assembly);
14+
TestApprover.Verify(publicApi);
5315
}
5416
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("NServiceBus.Metrics.ServiceControl.Msmq.Tests")]
2+
[assembly: System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName=".NET Framework 4.5.2")]

src/NServiceBus.Metrics.ServiceControl..Msmq.Tests/NServiceBus.Metrics.ServiceControl.Msmq.Tests.csproj

+5-18
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,16 @@
44
<TargetFramework>net452</TargetFramework>
55
</PropertyGroup>
66

7-
<ItemGroup>
8-
<Compile Remove="APIApprovals.Approve.approved.cs" />
9-
<Compile Remove="APIApprovals.Approve.received.cs" />
10-
</ItemGroup>
11-
12-
<ItemGroup>
13-
<PackageReference Include="NUnit" Version="3.8.1" />
14-
<PackageReference Include="ApprovalTests" Version="3.*" />
15-
<PackageReference Include="ApprovalUtilities" Version="3.*" />
16-
<PackageReference Include="PublicApiGenerator" Version="6.1.0-*" />
17-
</ItemGroup>
18-
197
<ItemGroup>
208
<ProjectReference Include="..\NServiceBus.Metrics.ServiceControl.Msmq\NServiceBus.Metrics.ServiceControl.Msmq.csproj" />
219
</ItemGroup>
2210

2311
<ItemGroup>
24-
<Reference Include="Microsoft.CSharp">
25-
<HintPath>..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll</HintPath>
26-
</Reference>
12+
<PackageReference Include="ApprovalTests" Version="3.0.13" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
14+
<PackageReference Include="NUnit" Version="3.8.1" />
15+
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0-alpha1" />
16+
<PackageReference Include="PublicApiGenerator" Version="7.0.1" />
2717
</ItemGroup>
2818

29-
<ItemGroup>
30-
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
31-
</ItemGroup>
3219
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
namespace NServiceBus.Metrics.ServiceControl.Msmq.Tests
2+
{
3+
using System.IO;
4+
using ApprovalTests;
5+
using ApprovalTests.Namers;
6+
using NUnit.Framework;
7+
8+
static class TestApprover
9+
{
10+
public static void Verify(string text)
11+
{
12+
var writer = new ApprovalTextWriter(text);
13+
var namer = new ApprovalNamer();
14+
Approvals.Verify(writer, namer, Approvals.GetReporter());
15+
}
16+
17+
class ApprovalNamer : UnitTestFrameworkNamer
18+
{
19+
public override string SourcePath { get; } = Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "..", "ApprovalFiles");
20+
}
21+
}
22+
}

src/NServiceBus.Metrics.ServiceControl.Msmq.sln

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NServiceBus.Metrics.Service
77
EndProject
88
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NServiceBus.Metrics.ServiceControl.Msmq.Tests", "NServiceBus.Metrics.ServiceControl..Msmq.Tests\NServiceBus.Metrics.ServiceControl.Msmq.Tests.csproj", "{09E52424-06AF-4948-92D8-560491309181}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleEndpoint", "SampleEndpoint\SampleEndpoint.csproj", "{76FADEEE-3788-4F59-902A-A970167CE11F}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleEndpoint", "SampleEndpoint\SampleEndpoint.csproj", "{76FADEEE-3788-4F59-902A-A970167CE11F}"
11+
EndProject
12+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{42F8E1AE-8378-4E5B-A5D8-57F9EA54B0DD}"
13+
ProjectSection(SolutionItems) = preProject
14+
Directory.Build.props = Directory.Build.props
15+
..\GitVersion.yml = ..\GitVersion.yml
16+
EndProjectSection
1117
EndProject
1218
Global
1319
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/NServiceBus.Metrics.ServiceControl.Msmq.sln.DotSettings

+6
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_IFELSE_BRACES_STYLE/@EntryValue">ALWAYS_ADD</s:String>
164164
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_USING_BRACES_STYLE/@EntryValue">ALWAYS_ADD</s:String>
165165
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/FORCE_WHILE_BRACES_STYLE/@EntryValue">ALWAYS_ADD</s:String>
166+
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSORHOLDER_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
166167
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
167168
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_FIXED_PARENTHESES/@EntryValue">False</s:Boolean>
168169
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_SIZEOF_PARENTHESES/@EntryValue">False</s:Boolean>
@@ -556,9 +557,14 @@ II.2.12 &lt;HandlesEvent /&gt;&#xD;
556557
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=NAMESPACE_005FALIAS/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
557558
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FFIELD/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
558559
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FRESOURCE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
560+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
559561
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpFileLayoutPatternsUpgrade/@EntryIndexedValue">True</s:Boolean>
562+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
563+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
564+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
560565
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
561566
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
567+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
562568
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
563569
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
564570
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EXml_002ECodeStyle_002EFormatSettingsUpgrade_002EXmlMoveToCommonFormatterSettingsUpgrade/@EntryIndexedValue">True</s:Boolean>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
using System.Runtime.CompilerServices;
2+
3+
[assembly: InternalsVisibleTo("NServiceBus.Metrics.ServiceControl.Msmq.Tests")]

src/NServiceBus.Metrics.ServiceControl.Msmq/NServiceBus.Metrics.ServiceControl.Msmq.csproj

+12-14
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@
22

33
<PropertyGroup>
44
<TargetFramework>net452</TargetFramework>
5-
<OutputPath>..\..\binaries\</OutputPath>
6-
<DocumentationFile>..\..\binaries\net452\NServiceBus.Metrics.ServiceControl.Msmq.xml</DocumentationFile>
7-
<LangVersion>7</LangVersion>
8-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
9-
<DebugType>full</DebugType>
10-
<DebugSymbols>true</DebugSymbols>
115
</PropertyGroup>
6+
127
<ItemGroup>
13-
<PackageReference Include="NServiceBus.Metrics.ServiceControl" Version="2.1.0" />
14-
<PackageReference Include="NServiceBus" Version="6.2.0" />
15-
<PackageReference Include="GitVersionTask" Version="3.6.5" />
16-
<PackageReference Include="NuGetPackager" Version="0.6.5" />
8+
<PackageReference Include="NServiceBus" Version="[7.0.1, 8.0.0)" />
9+
<PackageReference Include="NServiceBus.Metrics.ServiceControl" Version="[3.0.1, 4.0.0)" />
10+
<PackageReference Include="NServiceBus.Transport.Msmq" Version="[1.0.0, 2.0.0)" />
11+
<PackageReference Include="Particular.Packaging" Version="0.1.0" PrivateAssets="All" />
1712
</ItemGroup>
13+
14+
<PropertyGroup>
15+
<Description>Extension to NServiceBus.Metrics.ServiceControl for providing native MSMQ queue length data to ServiceControl Monitoring instance</Description>
16+
</PropertyGroup>
17+
1818
<ItemGroup>
19-
<Reference Include="System.Messaging">
20-
<HintPath>..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Messaging.dll</HintPath>
21-
</Reference>
19+
<PackageReference Include="SourceLink.Create.GitHub" Version="2.5.0" PrivateAssets="All" />
20+
<DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.5.0" />
2221
</ItemGroup>
23-
2422

2523
</Project>

src/SampleEndpoint/Program.cs

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ static async Task Main(string[] args)
1818
endpointConfig.UsePersistence<InMemoryPersistence>();
1919
endpointConfig.AuditProcessedMessagesTo("audit");
2020
endpointConfig.SendFailedMessagesTo("error");
21+
endpointConfig.LimitMessageProcessingConcurrencyTo(1);
22+
endpointConfig.EnableInstallers();
23+
endpointConfig.OverrideLocalAddress("SomeOtherName");
2124

2225
var endpoint = await Endpoint.Start(endpointConfig).ConfigureAwait(false);
2326

src/SampleEndpoint/SampleEndpoint.csproj

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<OutputType>Exe</OutputType>
54
<TargetFramework>net452</TargetFramework>
6-
<LangVersion>7.1</LangVersion>
5+
<OutputType>Exe</OutputType>
76
</PropertyGroup>
87

98
<ItemGroup>

0 commit comments

Comments
 (0)