-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: verify public API so we can detect (breaking) changes (#131)
- Loading branch information
Showing
21 changed files
with
656 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
test/Correlate.Abstractions.Tests/Correlate.Abstractions.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks> | ||
<TargetFrameworks Condition="'$(NetPreview)'=='true'">$(TargetFrameworks);netx.0</TargetFrameworks> | ||
<IsTestProject>true</IsTestProject> | ||
<RootNamespace>Correlate</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Correlate.Abstractions\Correlate.Abstractions.csproj" /> | ||
<ProjectReference Include="..\Correlate.Testing\Correlate.Testing.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
54 changes: 54 additions & 0 deletions
54
test/Correlate.Abstractions.Tests/PublicApi/.NET_8.0.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/skwasjer/Correlate")] | ||
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] | ||
namespace Correlate | ||
{ | ||
public class CorrelationContext | ||
{ | ||
public CorrelationContext() { } | ||
public string? CorrelationId { get; set; } | ||
} | ||
public class ErrorContext | ||
{ | ||
public Correlate.CorrelationContext CorrelationContext { get; } | ||
public System.Exception Exception { get; } | ||
public bool IsErrorHandled { get; set; } | ||
} | ||
public class ErrorContext<T> : Correlate.ErrorContext | ||
{ | ||
public T Result { get; set; } | ||
} | ||
public interface IActivity | ||
{ | ||
Correlate.CorrelationContext Start(string correlationId); | ||
void Stop(); | ||
} | ||
public interface IActivityFactory | ||
{ | ||
Correlate.IActivity CreateActivity(); | ||
} | ||
public interface IAsyncCorrelationManager | ||
{ | ||
System.Threading.Tasks.Task CorrelateAsync(string? correlationId, System.Func<System.Threading.Tasks.Task> correlatedTask, Correlate.OnError? onError); | ||
System.Threading.Tasks.Task<T> CorrelateAsync<T>(string? correlationId, System.Func<System.Threading.Tasks.Task<T>> correlatedTask, Correlate.OnError<T>? onError); | ||
} | ||
public interface ICorrelationContextAccessor | ||
{ | ||
Correlate.CorrelationContext? CorrelationContext { get; set; } | ||
} | ||
public interface ICorrelationContextFactory | ||
{ | ||
Correlate.CorrelationContext Create(string correlationId); | ||
void Dispose(); | ||
} | ||
public interface ICorrelationIdFactory | ||
{ | ||
string Create(); | ||
} | ||
public interface ICorrelationManager | ||
{ | ||
void Correlate(string? correlationId, System.Action correlatedAction, Correlate.OnError? onError); | ||
T Correlate<T>(string? correlationId, System.Func<T> correlatedFunc, Correlate.OnError<T>? onError); | ||
} | ||
public delegate void OnError(Correlate.ErrorContext errorContext); | ||
public delegate void OnError<T>(Correlate.ErrorContext<T> errorContext); | ||
} |
54 changes: 54 additions & 0 deletions
54
test/Correlate.Abstractions.Tests/PublicApi/.NET_9.0.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/skwasjer/Correlate")] | ||
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v9.0", FrameworkDisplayName=".NET 9.0")] | ||
namespace Correlate | ||
{ | ||
public class CorrelationContext | ||
{ | ||
public CorrelationContext() { } | ||
public string? CorrelationId { get; set; } | ||
} | ||
public class ErrorContext | ||
{ | ||
public Correlate.CorrelationContext CorrelationContext { get; } | ||
public System.Exception Exception { get; } | ||
public bool IsErrorHandled { get; set; } | ||
} | ||
public class ErrorContext<T> : Correlate.ErrorContext | ||
{ | ||
public T Result { get; set; } | ||
} | ||
public interface IActivity | ||
{ | ||
Correlate.CorrelationContext Start(string correlationId); | ||
void Stop(); | ||
} | ||
public interface IActivityFactory | ||
{ | ||
Correlate.IActivity CreateActivity(); | ||
} | ||
public interface IAsyncCorrelationManager | ||
{ | ||
System.Threading.Tasks.Task CorrelateAsync(string? correlationId, System.Func<System.Threading.Tasks.Task> correlatedTask, Correlate.OnError? onError); | ||
System.Threading.Tasks.Task<T> CorrelateAsync<T>(string? correlationId, System.Func<System.Threading.Tasks.Task<T>> correlatedTask, Correlate.OnError<T>? onError); | ||
} | ||
public interface ICorrelationContextAccessor | ||
{ | ||
Correlate.CorrelationContext? CorrelationContext { get; set; } | ||
} | ||
public interface ICorrelationContextFactory | ||
{ | ||
Correlate.CorrelationContext Create(string correlationId); | ||
void Dispose(); | ||
} | ||
public interface ICorrelationIdFactory | ||
{ | ||
string Create(); | ||
} | ||
public interface ICorrelationManager | ||
{ | ||
void Correlate(string? correlationId, System.Action correlatedAction, Correlate.OnError? onError); | ||
T Correlate<T>(string? correlationId, System.Func<T> correlatedFunc, Correlate.OnError<T>? onError); | ||
} | ||
public delegate void OnError(Correlate.ErrorContext errorContext); | ||
public delegate void OnError<T>(Correlate.ErrorContext<T> errorContext); | ||
} |
54 changes: 54 additions & 0 deletions
54
test/Correlate.Abstractions.Tests/PublicApi/.NET_Standard_2.0_via_.NET_6.0.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/skwasjer/Correlate")] | ||
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName=".NET Standard 2.0")] | ||
namespace Correlate | ||
{ | ||
public class CorrelationContext | ||
{ | ||
public CorrelationContext() { } | ||
public string? CorrelationId { get; set; } | ||
} | ||
public class ErrorContext | ||
{ | ||
public Correlate.CorrelationContext CorrelationContext { get; } | ||
public System.Exception Exception { get; } | ||
public bool IsErrorHandled { get; set; } | ||
} | ||
public class ErrorContext<T> : Correlate.ErrorContext | ||
{ | ||
public T Result { get; set; } | ||
} | ||
public interface IActivity | ||
{ | ||
Correlate.CorrelationContext Start(string correlationId); | ||
void Stop(); | ||
} | ||
public interface IActivityFactory | ||
{ | ||
Correlate.IActivity CreateActivity(); | ||
} | ||
public interface IAsyncCorrelationManager | ||
{ | ||
System.Threading.Tasks.Task CorrelateAsync(string? correlationId, System.Func<System.Threading.Tasks.Task> correlatedTask, Correlate.OnError? onError); | ||
System.Threading.Tasks.Task<T> CorrelateAsync<T>(string? correlationId, System.Func<System.Threading.Tasks.Task<T>> correlatedTask, Correlate.OnError<T>? onError); | ||
} | ||
public interface ICorrelationContextAccessor | ||
{ | ||
Correlate.CorrelationContext? CorrelationContext { get; set; } | ||
} | ||
public interface ICorrelationContextFactory | ||
{ | ||
Correlate.CorrelationContext Create(string correlationId); | ||
void Dispose(); | ||
} | ||
public interface ICorrelationIdFactory | ||
{ | ||
string Create(); | ||
} | ||
public interface ICorrelationManager | ||
{ | ||
void Correlate(string? correlationId, System.Action correlatedAction, Correlate.OnError? onError); | ||
T Correlate<T>(string? correlationId, System.Func<T> correlatedFunc, Correlate.OnError<T>? onError); | ||
} | ||
public delegate void OnError(Correlate.ErrorContext errorContext); | ||
public delegate void OnError<T>(Correlate.ErrorContext<T> errorContext); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Correlate.Testing.Specs; | ||
|
||
namespace Correlate; | ||
|
||
public sealed class PublicApiTests : PublicApiSpec | ||
{ | ||
public PublicApiTests() | ||
: base(typeof(IActivity)) | ||
{ | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
test/Correlate.AspNetCore.Tests/PublicApi/.NET_8.0.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/skwasjer/Correlate")] | ||
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] | ||
namespace Correlate.AspNetCore | ||
{ | ||
public static class AppBuilderExtensions | ||
{ | ||
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCorrelate(this Microsoft.AspNetCore.Builder.IApplicationBuilder appBuilder) { } | ||
} | ||
public sealed class CorrelateOptions : Correlate.CorrelationManagerOptions | ||
{ | ||
public CorrelateOptions() { } | ||
public bool IncludeInResponse { get; set; } | ||
public System.Collections.Generic.IReadOnlyList<string>? RequestHeaders { get; set; } | ||
} | ||
} | ||
namespace Correlate.DependencyInjection | ||
{ | ||
public static class ServiceCollectionExtensions | ||
{ | ||
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddCorrelate(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Correlate.AspNetCore.CorrelateOptions> configureOptions) { } | ||
} | ||
} | ||
namespace Correlate | ||
{ | ||
public class RequestIdentifierCorrelationIdFactory : Correlate.ICorrelationIdFactory | ||
{ | ||
public RequestIdentifierCorrelationIdFactory() { } | ||
public string Create() { } | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
test/Correlate.AspNetCore.Tests/PublicApi/.NET_9.0.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/skwasjer/Correlate")] | ||
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v9.0", FrameworkDisplayName=".NET 9.0")] | ||
namespace Correlate.AspNetCore | ||
{ | ||
public static class AppBuilderExtensions | ||
{ | ||
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCorrelate(this Microsoft.AspNetCore.Builder.IApplicationBuilder appBuilder) { } | ||
} | ||
public sealed class CorrelateOptions : Correlate.CorrelationManagerOptions | ||
{ | ||
public CorrelateOptions() { } | ||
public bool IncludeInResponse { get; set; } | ||
public System.Collections.Generic.IReadOnlyList<string>? RequestHeaders { get; set; } | ||
} | ||
} | ||
namespace Correlate.DependencyInjection | ||
{ | ||
public static class ServiceCollectionExtensions | ||
{ | ||
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddCorrelate(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Correlate.AspNetCore.CorrelateOptions> configureOptions) { } | ||
} | ||
} | ||
namespace Correlate | ||
{ | ||
public class RequestIdentifierCorrelationIdFactory : Correlate.ICorrelationIdFactory | ||
{ | ||
public RequestIdentifierCorrelationIdFactory() { } | ||
public string Create() { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Correlate.AspNetCore; | ||
using Correlate.Testing.Specs; | ||
|
||
namespace Correlate; | ||
|
||
public sealed class PublicApiTests : PublicApiSpec | ||
{ | ||
public PublicApiTests() | ||
: base(typeof(ICorrelateFeature)) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/skwasjer/Correlate")] | ||
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] | ||
namespace Correlate | ||
{ | ||
public static class AsyncCorrelationManagerExtensions | ||
{ | ||
public static System.Threading.Tasks.Task CorrelateAsync(this Correlate.IAsyncCorrelationManager asyncCorrelationManager, System.Func<System.Threading.Tasks.Task> correlatedTask) { } | ||
public static System.Threading.Tasks.Task CorrelateAsync(this Correlate.IAsyncCorrelationManager asyncCorrelationManager, System.Func<System.Threading.Tasks.Task> correlatedTask, Correlate.OnError? onError) { } | ||
public static System.Threading.Tasks.Task CorrelateAsync(this Correlate.IAsyncCorrelationManager asyncCorrelationManager, string? correlationId, System.Func<System.Threading.Tasks.Task> correlatedTask) { } | ||
public static System.Threading.Tasks.Task<T> CorrelateAsync<T>(this Correlate.IAsyncCorrelationManager asyncCorrelationManager, System.Func<System.Threading.Tasks.Task<T>> correlatedTask) { } | ||
public static System.Threading.Tasks.Task<T> CorrelateAsync<T>(this Correlate.IAsyncCorrelationManager asyncCorrelationManager, System.Func<System.Threading.Tasks.Task<T>> correlatedTask, Correlate.OnError<T>? onError) { } | ||
public static System.Threading.Tasks.Task<T> CorrelateAsync<T>(this Correlate.IAsyncCorrelationManager asyncCorrelationManager, string? correlationId, System.Func<System.Threading.Tasks.Task<T>> correlatedTask) { } | ||
} | ||
public class CorrelationContextAccessor : Correlate.ICorrelationContextAccessor | ||
{ | ||
public CorrelationContextAccessor() { } | ||
public Correlate.CorrelationContext? CorrelationContext { get; set; } | ||
} | ||
public class CorrelationContextFactory : Correlate.ICorrelationContextFactory | ||
{ | ||
public CorrelationContextFactory() { } | ||
public CorrelationContextFactory(Correlate.ICorrelationContextAccessor correlationContextAccessor) { } | ||
public virtual Correlate.CorrelationContext Create(string correlationId) { } | ||
public void Dispose() { } | ||
} | ||
public class CorrelationManager : Correlate.IActivityFactory, Correlate.IAsyncCorrelationManager, Correlate.ICorrelationManager | ||
{ | ||
public CorrelationManager(Correlate.ICorrelationContextFactory correlationContextFactory, Correlate.ICorrelationIdFactory correlationIdFactory, Correlate.ICorrelationContextAccessor correlationContextAccessor, Microsoft.Extensions.Logging.ILogger<Correlate.CorrelationManager> logger) { } | ||
public CorrelationManager(Correlate.ICorrelationContextFactory correlationContextFactory, Correlate.ICorrelationIdFactory correlationIdFactory, Correlate.ICorrelationContextAccessor correlationContextAccessor, Microsoft.Extensions.Logging.ILogger<Correlate.CorrelationManager> logger, System.Diagnostics.DiagnosticListener diagnosticListener) { } | ||
public CorrelationManager(Correlate.ICorrelationContextFactory correlationContextFactory, Correlate.ICorrelationIdFactory correlationIdFactory, Correlate.ICorrelationContextAccessor correlationContextAccessor, Microsoft.Extensions.Logging.ILogger<Correlate.CorrelationManager> logger, System.Diagnostics.DiagnosticListener diagnosticListener, Microsoft.Extensions.Options.IOptions<Correlate.CorrelationManagerOptions> options) { } | ||
public void Correlate(string? correlationId, System.Action correlatedAction, Correlate.OnError? onError) { } | ||
public T Correlate<T>(string? correlationId, System.Func<T> correlatedFunc, Correlate.OnError<T>? onError) { } | ||
public System.Threading.Tasks.Task CorrelateAsync(string? correlationId, System.Func<System.Threading.Tasks.Task> correlatedTask, Correlate.OnError? onError) { } | ||
public System.Threading.Tasks.Task<T> CorrelateAsync<T>(string? correlationId, System.Func<System.Threading.Tasks.Task<T>> correlatedTask, Correlate.OnError<T>? onError) { } | ||
public Correlate.IActivity CreateActivity() { } | ||
} | ||
public static class CorrelationManagerExtensions | ||
{ | ||
public static void Correlate(this Correlate.ICorrelationManager correlationManager, System.Action correlatedAction) { } | ||
public static void Correlate(this Correlate.ICorrelationManager correlationManager, System.Action correlatedAction, Correlate.OnError? onError) { } | ||
public static void Correlate(this Correlate.ICorrelationManager correlationManager, string? correlationId, System.Action correlatedAction) { } | ||
public static T Correlate<T>(this Correlate.ICorrelationManager correlationManager, System.Func<T> correlatedFunc) { } | ||
public static T Correlate<T>(this Correlate.ICorrelationManager correlationManager, System.Func<T> correlatedFunc, Correlate.OnError<T>? onError) { } | ||
public static T Correlate<T>(this Correlate.ICorrelationManager correlationManager, string? correlationId, System.Func<T> correlatedFunc) { } | ||
} | ||
public class CorrelationManagerOptions | ||
{ | ||
public CorrelationManagerOptions() { } | ||
public string LoggingScopeKey { get; set; } | ||
} | ||
public class GuidCorrelationIdFactory : Correlate.ICorrelationIdFactory | ||
{ | ||
public GuidCorrelationIdFactory() { } | ||
public string Create() { } | ||
} | ||
} | ||
namespace Correlate.Http | ||
{ | ||
public class CorrelateClientOptions | ||
{ | ||
public CorrelateClientOptions() { } | ||
public string RequestHeader { get; set; } | ||
} | ||
public class CorrelatingHttpMessageHandler : System.Net.Http.DelegatingHandler | ||
{ | ||
public CorrelatingHttpMessageHandler(Correlate.ICorrelationContextAccessor correlationContextAccessor, Microsoft.Extensions.Options.IOptions<Correlate.Http.CorrelateClientOptions> options) { } | ||
public CorrelatingHttpMessageHandler(Correlate.ICorrelationContextAccessor correlationContextAccessor, Microsoft.Extensions.Options.IOptions<Correlate.Http.CorrelateClientOptions> options, System.Net.Http.HttpMessageHandler innerHandler) { } | ||
protected override System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) { } | ||
} | ||
public static class CorrelationHttpHeaders | ||
{ | ||
public const string CorrelationId = "X-Correlation-ID"; | ||
public const string RequestId = "X-Request-ID"; | ||
} | ||
} |
Oops, something went wrong.