Skip to content

Commit

Permalink
Merge branch 'master' into stef-aspire
Browse files Browse the repository at this point in the history
  • Loading branch information
StefH committed Jul 18, 2024
2 parents ca82454 + 54edf0b commit 2b29198
Show file tree
Hide file tree
Showing 573 changed files with 1,292 additions and 170 deletions.
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ indent_style = space
indent_size = 4
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
trim_trailing_whitespace = true

# C# files
[*.cs]
file_header_template=Copyright © WireMock.Net
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<RepositoryUrl>https://github.com/WireMock-Net/WireMock.Net</RepositoryUrl>
<ApplicationIcon>../../resources/WireMock.Net-Logo.ico</ApplicationIcon>
<PackageReadmeFile>PackageReadme.md</PackageReadmeFile>
<LangVersion>Latest</LangVersion>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ For more info, see also this WIKI page: [What is WireMock.Net](https://github.co
| &nbsp;&nbsp;**Quality** | [![Sonar Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=WireMock-Net_WireMock.Net&metric=alert_status)](https://sonarcloud.io/project/issues?id=WireMock-Net_WireMock.Net) [![CodeFactor](https://www.codefactor.io/repository/github/wiremock-net/wiremock.net/badge)](https://www.codefactor.io/repository/github/wiremock-net/wiremock.net) |
| &nbsp;&nbsp;**Sonar Bugs** | [![Sonar Bugs](https://sonarcloud.io/api/project_badges/measure?project=WireMock-Net_WireMock.Net&metric=bugs)](https://sonarcloud.io/project/issues?id=WireMock-Net_WireMock.Net&resolved=false&types=BUG) [![Sonar Code Smells](https://sonarcloud.io/api/project_badges/measure?project=WireMock-Net_WireMock.Net&metric=code_smells)](https://sonarcloud.io/project/issues?id=WireMock-Net_WireMock.Net&resolved=false&types=CODE_SMELL) |
| &nbsp;&nbsp;**Coverage** | [![Sonar Coverage](https://sonarcloud.io/api/project_badges/measure?project=WireMock-Net_WireMock.Net&metric=coverage)](https://sonarcloud.io/component_measures?id=WireMock-Net_WireMock.Net&metric=coverage) [![codecov](https://codecov.io/gh/WireMock-Net/WireMock.Net/branch/master/graph/badge.svg)](https://codecov.io/gh/WireMock-Net/WireMock.Net)|
| &nbsp;&nbsp;**TIOBE** | [TIOBE Quality Indicator](https://ticsdemo.tiobe.com/tiobeweb/DEMO/TqiDashboard.html#axes=Project(WireMock.Net),Sub()&metric=tqi)

### :package: NuGet packages

Expand Down
3 changes: 3 additions & 0 deletions WireMock.Net Solution.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.0.31521.260
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8F890C6F-9ACC-438D-928A-AD61CDA862F2}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0BB8B634-407A-4610-A91F-11586990767A}"
EndProject
Expand Down
1 change: 1 addition & 0 deletions WireMock.Net Solution.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=WWW/@EntryIndexedValue">WWW</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XMS/@EntryIndexedValue">XMS</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XUA/@EntryIndexedValue">XUA</s:String>
<s:Boolean x:Key="/Default/GrammarAndSpelling/GrammarChecking/Exceptions/=mock4net/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Dlls/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Flurl/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=funcs/@EntryIndexedValue">True</s:Boolean>
Expand Down
4 changes: 3 additions & 1 deletion examples/WireMock.Net.Client.Net472/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Newtonsoft.Json;
// Copyright © WireMock.Net

using Newtonsoft.Json;
using RestEase;
using System;
using System.Net.Http.Headers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Reflection;
// Copyright © WireMock.Net

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.Console.GrpcClient/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using Greet;
using Grpc.Net.Client;

Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.Console.NET6.WithCertificate/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System.IO;
using WireMock.Logging;
using WireMock.Server;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.Console.NET7.UsingNuGet/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System.Net;
using System.Net.Http.Headers;
using System.Text;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.Console.NET8/__admin/mappings/1.cs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// Copyright © WireMock.Net

// C# Hello
2 changes: 2 additions & 0 deletions examples/WireMock.Net.Console.NETCoreApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System.IO;
using System.Reflection;
using log4net;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// Copyright © WireMock.Net

// C# Hello
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using WireMock.Logging;
using WireMock.Server;
using WireMock.Settings;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System.Collections.Generic;
using System.IO;
using WireMock.Handlers;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.Console.Net452.Classic/MainApp.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System;
using System.Collections.Generic;
using System.Globalization;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.Console.Net452.Classic/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System.IO;
using log4net.Config;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Reflection;
// Copyright © WireMock.Net

using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Reflection;
// Copyright © WireMock.Net

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Reflection;
// Copyright © WireMock.Net

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.Console.Proxy.NETCoreApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using Newtonsoft.Json;
using WireMock.Logging;
using WireMock.RequestBuilders;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.Console.Proxy.Net452/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System;
using System.Collections.Specialized;
using System.Net.Http;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Reflection;
// Copyright © WireMock.Net

using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
4 changes: 3 additions & 1 deletion examples/WireMock.Net.Console.RequestLogTest/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
// Copyright © WireMock.Net

using System;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using RandomDataGenerator.FieldOptions;
using RandomDataGenerator.Randomizers;
using WireMock.Net.OpenApiParser.Settings;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.OpenApiParser.ConsoleApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System;
using System.IO;
using WireMock.RequestBuilders;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.OpenApiParser.ConsoleApp/Run.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
4 changes: 3 additions & 1 deletion examples/WireMock.Net.Service/Installer.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion examples/WireMock.Net.Service/Installer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
// Copyright © WireMock.Net

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
Expand Down
4 changes: 3 additions & 1 deletion examples/WireMock.Net.Service/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using log4net.Config;
// Copyright © WireMock.Net

using log4net.Config;
using System;
using System.IO;
using System.ServiceProcess;
Expand Down
4 changes: 3 additions & 1 deletion examples/WireMock.Net.Service/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Reflection;
// Copyright © WireMock.Net

using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
4 changes: 3 additions & 1 deletion examples/WireMock.Net.Service/WireMockLog4NetLogger.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
// Copyright © WireMock.Net

using System;
using log4net;
using Newtonsoft.Json;
using Wiremock.Net.Service;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.TestcontainersExample/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using Newtonsoft.Json;
using Testcontainers.MsSql;
using WireMock.Net.Testcontainers;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.WebApplication.NET6/App.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using Microsoft.Extensions.Hosting;
using System.Threading;
using System.Threading.Tasks;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.WebApplication.NET6/IWireMockService.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

namespace WireMock.Net.WebApplication;

public interface IWireMockService
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.WebApplication.NET6/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMock.Net.WebApplication.NET6/WireMockService.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
Expand Down
4 changes: 3 additions & 1 deletion examples/WireMock.Net.WebApplication.NETCore3/App.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Microsoft.Extensions.Hosting;
// Copyright © WireMock.Net

using Microsoft.Extensions.Hosting;
using System.Threading;
using System.Threading.Tasks;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace WireMock.Net.WebApplication
// Copyright © WireMock.Net

namespace WireMock.Net.WebApplication
{
public interface IWireMockService
{
Expand Down
4 changes: 3 additions & 1 deletion examples/WireMock.Net.WebApplication.NETCore3/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Microsoft.Extensions.Configuration;
// Copyright © WireMock.Net

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
// Copyright © WireMock.Net

using System;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
Expand Down
2 changes: 2 additions & 0 deletions examples/WireMockAzureQueueExample/Function1.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;

Expand Down
2 changes: 2 additions & 0 deletions examples/WireMockAzureQueueProxy/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using Newtonsoft.Json;
using WireMock.Logging;
using WireMock.Server;
Expand Down
23 changes: 23 additions & 0 deletions hdr.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
param($target = "C:\Dev\Github\WireMock.Net")

$header = "// Copyright © WireMock.Net
"

function Write-Header ($file) {
$content = Get-Content $file -Raw # Using -Raw to read the entire file as a single string
$filename = Split-Path -Leaf $file

# Check if the file content starts with the auto-generated line
if ($content.TrimStart().StartsWith("// <auto-generated>")) {
Write-Host "Skipping auto-generated file: $filename"
} else {
# If not an auto-generated file, prepend the header
Set-Content $file $header
Add-Content $file $content -NoNewline # Writing back to the file without an extra newline
}
}

Get-ChildItem $target -Recurse | ? { $_.Extension -like ".cs" } | % `
{
Write-Header $_.PSPath.Split(":", 3)[2]
}
15 changes: 15 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project>
<PropertyGroup>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.29.0.95321">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions src/WireMock.Net.Abstractions/Admin/Mappings/BodyModel.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

namespace WireMock.Admin.Mappings;

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions src/WireMock.Net.Abstractions/Admin/Mappings/ClientIPModel.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

namespace WireMock.Admin.Mappings;

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions src/WireMock.Net.Abstractions/Admin/Mappings/CookieModel.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System.Collections.Generic;

namespace WireMock.Admin.Mappings;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace WireMock.Admin.Mappings
// Copyright © WireMock.Net

namespace WireMock.Admin.Mappings
{
/// <summary>
/// EncodingModel
Expand Down
2 changes: 2 additions & 0 deletions src/WireMock.Net.Abstractions/Admin/Mappings/FaultModel.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

namespace WireMock.Admin.Mappings;

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions src/WireMock.Net.Abstractions/Admin/Mappings/HeaderModel.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System.Collections.Generic;

namespace WireMock.Admin.Mappings;
Expand Down
2 changes: 2 additions & 0 deletions src/WireMock.Net.Abstractions/Admin/Mappings/MappingModel.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System;
using WireMock.Models;

Expand Down
2 changes: 2 additions & 0 deletions src/WireMock.Net.Abstractions/Admin/Mappings/MatcherModel.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System.Collections.Generic;
using System;

Expand Down
Loading

0 comments on commit 2b29198

Please sign in to comment.