Skip to content

Commit

Permalink
Copyright © WireMock.Net
Browse files Browse the repository at this point in the history
  • Loading branch information
StefH committed Jul 16, 2024
1 parent 8596477 commit 61f9417
Show file tree
Hide file tree
Showing 558 changed files with 1,150 additions and 36 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<RepositoryUrl>https://github.com/WireMock-Net/WireMock.Net</RepositoryUrl>
<ApplicationIcon>../../resources/WireMock.Net-Logo.ico</ApplicationIcon>
<PackageReadmeFile>PackageReadme.md</PackageReadmeFile>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

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
17 changes: 11 additions & 6 deletions hdr.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ param($target = "C:\Dev\Github\WireMock.Net")
$header = "// Copyright © WireMock.Net
"

function Write-Header ($file)
{
$content = Get-Content $file
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
$fileheader = $header
Set-Content $file $fileheader
Add-Content $file $content

# 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" } | % `
Expand Down
3 changes: 2 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
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
2 changes: 2 additions & 0 deletions src/WireMock.Net.Abstractions/Admin/Mappings/ParamModel.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/PathModel.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/RequestModel.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/ResponseModel.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © WireMock.Net

using System.Collections.Generic;
using WireMock.Admin.Settings;

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

using System;

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

using System;

namespace WireMock.Models
Expand Down
2 changes: 2 additions & 0 deletions src/WireMock.Net.Abstractions/Admin/Mappings/UrlModel.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/WebProxyModel.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
Loading

0 comments on commit 61f9417

Please sign in to comment.