Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): Bump CSharpier.MSBuild from 0.25.0 to 0.26.3 #83

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .csharpierignore

This file was deleted.

2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<Import Project="$(DirEngineeringSettings)sln.packages.props" />
<ItemGroup>
<GlobalPackageReference Include="CSharpier.MSBuild" Version="0.25.0" />
<GlobalPackageReference Include="CSharpier.MSBuild" Version="0.26.3" />
<GlobalPackageReference Include="GitVersion.MsBuild" Version="5.12.0" />
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
<GlobalPackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace NetEvolve.Http.Correlation.Generators;

using NetEvolve.Http.Correlation.Abstractions;
using System;
using NetEvolve.Http.Correlation.Abstractions;

/// <inheritdoc />
internal sealed class GuidCorrelationIdProvider : IHttpCorrelationIdProvider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace NetEvolve.Http.Correlation;

using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using NetEvolve.Http.Correlation;
using NetEvolve.Http.Correlation.Abstractions;
using System;

/// <summary>
/// <see cref="IApplicationBuilder"/> Extensions for <see cref="HttpCorrelationMiddleware"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace NetEvolve.Http.Correlation;

using System;
using Microsoft.AspNetCore.Http;
using NetEvolve.Http.Correlation.Abstractions;
using System;

/// <inheritdoc />
internal sealed class HttpCorrelationAccessor : IHttpCorrelationAccessor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace NetEvolve.Http.Correlation;

using System;
using Microsoft.Extensions.DependencyInjection.Extensions;
using NetEvolve.Http.Correlation.Abstractions;
using NetEvolve.Http.Correlation.Generators;
using System;

/// <summary>
/// <see cref="IHttpCorrelationBuilder"/> Extensions.
Expand All @@ -19,7 +19,8 @@
{
ArgumentNullException.ThrowIfNull(builder);

builder.Services
builder
.Services

Check warning on line 23 in src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationBuilderExtensions.cs

View check run for this annotation

Codecov / codecov/patch

src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationBuilderExtensions.cs#L22-L23

Added lines #L22 - L23 were not covered by tests
.RemoveAll<IHttpCorrelationIdProvider>()
.TryAddSingleton<IHttpCorrelationIdProvider, GuidCorrelationIdProvider>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
namespace NetEvolve.Http.Correlation;

using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Primitives;
using NetEvolve.Http.Correlation.Abstractions;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

using static CorrelationConstants;

internal sealed class HttpCorrelationMiddleware
Expand Down Expand Up @@ -42,15 +41,17 @@

context.TraceIdentifier = correlationId;

context.Response.OnStarting(() =>
{
if (!context.Response.Headers.ContainsKey(usedHeaderName))
context
.Response
.OnStarting(() =>

Check warning on line 46 in src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs

View check run for this annotation

Codecov / codecov/patch

src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs#L44-L46

Added lines #L44 - L46 were not covered by tests
{
context.Response.Headers.Add(usedHeaderName, correlationId);
}
if (!context.Response.Headers.ContainsKey(usedHeaderName))
{
context.Response.Headers.Add(usedHeaderName, correlationId);
}

Check warning on line 51 in src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs

View check run for this annotation

Codecov / codecov/patch

src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs#L49-L51

Added lines #L49 - L51 were not covered by tests

return Task.CompletedTask;
});
return Task.CompletedTask;
});

Check warning on line 54 in src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs

View check run for this annotation

Codecov / codecov/patch

src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs#L53-L54

Added lines #L53 - L54 were not covered by tests

var accessor = context.RequestServices.GetService<IHttpCorrelationAccessor>()!;
accessor.HeaderName = usedHeaderName;
Expand All @@ -65,8 +66,9 @@

private static string GeneratedCorrelationId(HttpContext context)
{
var correlationIdGenerator =
context.RequestServices.GetService<IHttpCorrelationIdProvider>();
var correlationIdGenerator = context
.RequestServices
.GetService<IHttpCorrelationIdProvider>();

Check warning on line 71 in src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs

View check run for this annotation

Codecov / codecov/patch

src/NetEvolve.Http.Correlation.AspNetCore/HttpCorrelationMiddleware.cs#L69-L71

Added lines #L69 - L71 were not covered by tests

return correlationIdGenerator is null
? context.TraceIdentifier
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace NetEvolve.Http.Correlation;

using System;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using NetEvolve.Http.Correlation.Abstractions;
using System;

/// <summary>
/// <see cref="IServiceCollection"/> Extensions for <see cref="HttpCorrelationMiddleware"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace NetEvolve.Http.Correlation.HttpClient;

using System;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;

/// <summary>
/// <see cref="IHttpClientBuilder"/> Extensions for <see cref="HttpCorrelationIdHandler"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace NetEvolve.Http.Correlation.HttpClient;

using NetEvolve.Http.Correlation.Abstractions;
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using NetEvolve.Http.Correlation.Abstractions;

/// <summary>
/// a <see cref="DelegatingHandler"/> which implements the correlation id support,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace NetEvolve.Http.Correlation;

using System;
using Microsoft.Extensions.DependencyInjection.Extensions;
using NetEvolve.Http.Correlation.Abstractions;
using System;

/// <summary>
/// <see cref="IHttpCorrelationBuilder"/> Extensions.
Expand All @@ -27,7 +27,8 @@
generatedTestId = TestGeneratorCorrelationIdProvider.GeneratedTestId;
}

builder.Services
builder
.Services

Check warning on line 31 in src/NetEvolve.Http.Correlation.TestGenerator/HttpCorrelationBuilderExtensions.cs

View check run for this annotation

Codecov / codecov/patch

src/NetEvolve.Http.Correlation.TestGenerator/HttpCorrelationBuilderExtensions.cs#L30-L31

Added lines #L30 - L31 were not covered by tests
.RemoveAll<IHttpCorrelationIdProvider>()
.TryAddSingleton<IHttpCorrelationIdProvider>(
new TestGeneratorCorrelationIdProvider(generatedTestId)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace NetEvolve.Http.Correlation;

using NetEvolve.Http.Correlation.Abstractions;
using System;
using NetEvolve.Http.Correlation.Abstractions;

/// <inheritdoc />
internal sealed class TestGeneratorCorrelationIdProvider : IHttpCorrelationIdProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
public class UnitTest1
{
[Fact]
public void Test1()
{
}
public void Test1() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
public class UnitTest1
{
[Fact]
public void Test1()
{
}
public void Test1() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
public class UnitTest1
{
[Fact]
public void Test1()
{
}
public void Test1() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
public class UnitTest1
{
[Fact]
public void Test1()
{
}
public void Test1() { }
}