-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump ApprovalTests in /src/ServiceComposer.AspNetCore.Tests Bumps [ApprovalTests](https://github.com/approvals/ApprovalTests.Net) from 5.4.3 to 5.4.4. - [Release notes](https://github.com/approvals/ApprovalTests.Net/releases) - [Commits](https://github.com/approvals/ApprovalTests.Net/commits/5.4.4) Signed-off-by: dependabot[bot] <[email protected]> * Add .NET 5 support * Tests using .NET 5 * Test using .NET 5 * Options for .NET 5 * Approved API Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
91d0952
commit a8e648c
Showing
15 changed files
with
203 additions
and
22 deletions.
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
145 changes: 145 additions & 0 deletions
145
src/ServiceComposer.AspNetCore.Tests/API/NET5_0/APIApprovals.Approve_API.approved.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,145 @@ | ||
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/ServiceComposer/ServiceComposer.AspNetCore.git")] | ||
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ServiceComposer.AspNetCore.Tests")] | ||
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v5.0", FrameworkDisplayName="")] | ||
namespace ServiceComposer.AspNetCore | ||
{ | ||
public class AssemblyScanner | ||
{ | ||
public System.IO.SearchOption DirectorySearchOptions { get; set; } | ||
public bool IsEnabled { get; } | ||
public void AddAssemblyFilter(System.Func<string, ServiceComposer.AspNetCore.AssemblyScanner.FilterResults> filter) { } | ||
public void Disable() { } | ||
public enum FilterResults | ||
{ | ||
Exclude = 0, | ||
Include = 1, | ||
} | ||
} | ||
public class ComposedRequestIdHeader | ||
{ | ||
public const string Key = "composed-request-id"; | ||
public ComposedRequestIdHeader() { } | ||
} | ||
public static class ComposedRequestIdHeaderExtensions | ||
{ | ||
public static void AddComposedRequestIdHeader(this Microsoft.AspNetCore.Http.IHeaderDictionary headers, string requestId) { } | ||
public static void AddComposedRequestIdHeader(this System.Net.Http.Headers.HttpRequestHeaders headers, string requestId) { } | ||
public static string GetComposedRequestId(this Microsoft.AspNetCore.Http.IHeaderDictionary headers) { } | ||
public static string GetComposedRequestIdHeaderOr(this Microsoft.AspNetCore.Http.IHeaderDictionary headers, System.Func<string> defaultValue) { } | ||
} | ||
public delegate System.Threading.Tasks.Task CompositionEventHandler<in TEvent>(TEvent @event, Microsoft.AspNetCore.Http.HttpRequest httpRequest); | ||
public class CompositionHandler | ||
{ | ||
public CompositionHandler() { } | ||
[return: System.Runtime.CompilerServices.Dynamic(new bool[] { | ||
false, | ||
false, | ||
true, | ||
false})] | ||
[return: System.Runtime.CompilerServices.TupleElementNames(new string[] { | ||
"ViewModel", | ||
"StatusCode"})] | ||
public static System.Threading.Tasks.Task<System.ValueTuple<object, int>> HandleRequest(string requestId, Microsoft.AspNetCore.Http.HttpContext context) { } | ||
} | ||
public static class EndpointsExtensions | ||
{ | ||
public static void MapCompositionHandlers(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints) { } | ||
[System.Obsolete("To enable write support use the EnableWriteSupport() method on the ViewModelCompo" + | ||
"sitionOptions. This method will be removed in v2.")] | ||
public static void MapCompositionHandlers(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, bool enableWriteSupport) { } | ||
} | ||
public delegate System.Threading.Tasks.Task EventHandler<TEvent>(string requestId, [System.Runtime.CompilerServices.Dynamic] object viewModel, TEvent @event, Microsoft.AspNetCore.Routing.RouteData routeData, Microsoft.AspNetCore.Http.HttpRequest httpRequest); | ||
public static class HttpRequestExtensions | ||
{ | ||
public static readonly string ComposedResponseModelKey; | ||
[return: System.Runtime.CompilerServices.Dynamic] | ||
public static object GetComposedResponseModel(this Microsoft.AspNetCore.Http.HttpRequest request) { } | ||
} | ||
public interface ICompositionErrorsHandler | ||
{ | ||
System.Threading.Tasks.Task OnRequestError(Microsoft.AspNetCore.Http.HttpRequest request, System.Exception ex); | ||
} | ||
public interface ICompositionEventsPublisher | ||
{ | ||
void Subscribe<TEvent>(ServiceComposer.AspNetCore.CompositionEventHandler<TEvent> handler); | ||
} | ||
public interface ICompositionEventsSubscriber | ||
{ | ||
void Subscribe(ServiceComposer.AspNetCore.ICompositionEventsPublisher publisher); | ||
} | ||
public interface ICompositionRequestsHandler | ||
{ | ||
System.Threading.Tasks.Task Handle(Microsoft.AspNetCore.Http.HttpRequest request); | ||
} | ||
public interface IHandleRequests : ServiceComposer.AspNetCore.IInterceptRoutes | ||
{ | ||
System.Threading.Tasks.Task Handle(string requestId, [System.Runtime.CompilerServices.Dynamic] object vm, Microsoft.AspNetCore.Routing.RouteData routeData, Microsoft.AspNetCore.Http.HttpRequest request); | ||
} | ||
public interface IHandleRequestsErrors : ServiceComposer.AspNetCore.IInterceptRoutes | ||
{ | ||
System.Threading.Tasks.Task OnRequestError(string requestId, System.Exception ex, [System.Runtime.CompilerServices.Dynamic] object vm, Microsoft.AspNetCore.Routing.RouteData routeData, Microsoft.AspNetCore.Http.HttpRequest request); | ||
} | ||
public interface IInterceptRoutes | ||
{ | ||
bool Matches(Microsoft.AspNetCore.Routing.RouteData routeData, string httpVerb, Microsoft.AspNetCore.Http.HttpRequest request); | ||
} | ||
public interface IPublishCompositionEvents | ||
{ | ||
void Subscribe<TEvent>(ServiceComposer.AspNetCore.EventHandler<TEvent> handler); | ||
} | ||
public interface ISubscribeToCompositionEvents : ServiceComposer.AspNetCore.IInterceptRoutes | ||
{ | ||
void Subscribe(ServiceComposer.AspNetCore.IPublishCompositionEvents publisher); | ||
} | ||
public interface IViewModelCompositionOptionsCustomization | ||
{ | ||
void Customize(ServiceComposer.AspNetCore.ViewModelCompositionOptions options); | ||
} | ||
public interface IViewModelPreviewHandler | ||
{ | ||
[System.Obsolete("Use Preview(HttpRequest request, dynamic viewModel). Will be removed in v2.")] | ||
System.Threading.Tasks.Task Preview([System.Runtime.CompilerServices.Dynamic] object viewModel); | ||
System.Threading.Tasks.Task Preview(Microsoft.AspNetCore.Http.HttpRequest request, [System.Runtime.CompilerServices.Dynamic] object viewModel); | ||
} | ||
public static class ServiceCollectionExtensions | ||
{ | ||
public static void AddViewModelComposition(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) { } | ||
public static void AddViewModelComposition(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<ServiceComposer.AspNetCore.ViewModelCompositionOptions> config) { } | ||
} | ||
public class ViewModelCompositionOptions | ||
{ | ||
public ServiceComposer.AspNetCore.AssemblyScanner AssemblyScanner { get; } | ||
public Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } | ||
public void AddServicesConfigurationHandler(System.Type serviceType, System.Action<System.Type, Microsoft.Extensions.DependencyInjection.IServiceCollection> configurationHandler) { } | ||
public void AddTypesRegistrationHandler(System.Func<System.Type, bool> typesFilter, System.Action<System.Collections.Generic.IEnumerable<System.Type>> registrationHandler) { } | ||
public void EnableCompositionOverControllers() { } | ||
public void EnableCompositionOverControllers(bool useCaseInsensitiveRouteMatching) { } | ||
public void EnableWriteSupport() { } | ||
public void RegisterCompositionEventsSubscriber<T>() | ||
where T : ServiceComposer.AspNetCore.ISubscribeToCompositionEvents { } | ||
public void RegisterCompositionHandler<T>() { } | ||
public void RegisterRequestsHandler<T>() | ||
where T : ServiceComposer.AspNetCore.IHandleRequests { } | ||
} | ||
} | ||
namespace ServiceComposer.AspNetCore.Gateway | ||
{ | ||
public static class ApplicationBuilderExtensions | ||
{ | ||
public static void RunCompositionGateway(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Action<Microsoft.AspNetCore.Routing.IRouteBuilder> routes = null) { } | ||
public static void RunCompositionGatewayWithDefaultRoutes(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) { } | ||
} | ||
public static class Composition | ||
{ | ||
public static System.Threading.Tasks.Task HandleRequest(Microsoft.AspNetCore.Http.HttpContext context) { } | ||
} | ||
public static class RouteBuilderExtentions | ||
{ | ||
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapComposableDelete(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string template, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults = null, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens = null) { } | ||
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapComposableGet(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string template, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults = null, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens = null) { } | ||
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapComposablePatch(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string template, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults = null, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens = null) { } | ||
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapComposablePost(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string template, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults = null, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens = null) { } | ||
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapComposablePut(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string template, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults = null, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens = null) { } | ||
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapComposableRoute(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string template, System.Collections.Generic.IDictionary<string, object> constraints, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults = null, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens = null) { } | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...2_0/APIApprovals.Approve_API.approved.txt → ...2_1/APIApprovals.Approve_API.approved.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
1 change: 1 addition & 0 deletions
1
src/ServiceComposer.AspNetCore.Tests/API/NETCOREAPP3_1/APIApprovals.Approve_API.approved.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if NETCOREAPP3_1 | ||
#if NETCOREAPP3_1 || NET5_0 | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
|
2 changes: 1 addition & 1 deletion
2
src/ServiceComposer.AspNetCore/CompositionEndpointDataSource.cs
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if NETCOREAPP3_1 | ||
#if NETCOREAPP3_1 || NET5_0 | ||
|
||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
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
2 changes: 1 addition & 1 deletion
2
src/ServiceComposer.AspNetCore/CompositionOverControllersActionFilter.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if NETCOREAPP3_1 | ||
#if NETCOREAPP3_1 || NET5_0 | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if NETCOREAPP3_1 | ||
#if NETCOREAPP3_1 || NET5_0 | ||
|
||
using Microsoft.AspNetCore.Http; | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if NETCOREAPP3_1 | ||
#if NETCOREAPP3_1 || NET5_0 | ||
|
||
using System; | ||
using System.Threading.Tasks; | ||
|
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