3 instantiations of YarpRoute
Aspire.Hosting.Yarp (1)
ConfigurationBuilder\YarpConfigurationBuilder.cs (1)
17var route = new YarpRoute(cluster, routeId);
Aspire.Hosting.Yarp.Tests (2)
YarpConfigGeneratorTests.cs (2)
234_validRoutes.Select(r => new YarpRoute(r)).ToList(), 253_validRoutes.Select(r => new YarpRoute(r)).ToList(),
114 references to YarpRoute
Aspire.Hosting.Yarp (110)
ConfigurationBuilder\IYarpConfigurationBuilder.cs (11)
24public YarpRoute AddRoute(string path, YarpCluster cluster); 153public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, YarpCluster cluster) 165internal static YarpRoute AddCatchAllRoute( 179public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, EndpointReference endpoint) 191public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, IResourceBuilder<IResourceWithServiceDiscovery> resource) 204public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, string path, EndpointReference endpoint) 218public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, string path, IResourceBuilder<IResourceWithServiceDiscovery> resource) 232public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, string path, IResourceBuilder<ExternalServiceResource> externalService) 246internal static YarpRoute AddRoute( 261public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, IResourceBuilder<ExternalServiceResource> externalService) 266private static YarpRoute AddRouteCore(IYarpConfigurationBuilder builder, string path, object target)
ConfigurationBuilder\Transforms\ForwardedTransformExtensions.cs (6)
18public static YarpRoute WithTransformXForwarded( 19this YarpRoute route, 35public static YarpRoute WithTransformForwarded(this YarpRoute route, bool useHost = true, bool useProto = true, 46public static YarpRoute WithTransformClientCertHeader(this YarpRoute route, string headerName)
ConfigurationBuilder\Transforms\HttpMethodTransformExtensions.cs (2)
18public static YarpRoute WithTransformHttpMethodChange(this YarpRoute route, string fromHttpMethod, string toHttpMethod)
ConfigurationBuilder\Transforms\PathTransformExtensions.cs (20)
21public static YarpRoute WithTransformPathSet(this YarpRoute route, PathString path) 38/// <returns>The configured <see cref="YarpRoute"/>.</returns> 40internal static YarpRoute WithTransformPathSet(this YarpRoute route, string path) 53public static YarpRoute WithTransformPathPrefix(this YarpRoute route, PathString prefix) 70/// <returns>The configured <see cref="YarpRoute"/>.</returns> 72internal static YarpRoute WithTransformPathPrefix(this YarpRoute route, string prefix) 85public static YarpRoute WithTransformPathRemovePrefix(this YarpRoute route, PathString prefix) 102/// <returns>The configured <see cref="YarpRoute"/>.</returns> 104internal static YarpRoute WithTransformPathRemovePrefix(this YarpRoute route, string prefix) 117public static YarpRoute WithTransformPathRouteValues(this YarpRoute route, [StringSyntax("Route")] PathString pattern) 134/// <returns>The configured <see cref="YarpRoute"/>.</returns> 136internal static YarpRoute WithTransformPathRouteValues(this YarpRoute route, [StringSyntax("Route")] string pattern)
ConfigurationBuilder\Transforms\QueryTransformExtensions.cs (6)
18public static YarpRoute WithTransformQueryValue(this YarpRoute route, string queryKey, string value, bool append = true) 28public static YarpRoute WithTransformQueryRouteValue(this YarpRoute route, string queryKey, string routeValueKey, bool append = true) 38public static YarpRoute WithTransformQueryRemoveKey(this YarpRoute route, string queryKey)
ConfigurationBuilder\Transforms\RequestHeadersTransformExtensions.cs (12)
17public static YarpRoute WithTransformCopyRequestHeaders(this YarpRoute route, bool copy = true) 27public static YarpRoute WithTransformUseOriginalHostHeader(this YarpRoute route, bool useOriginal = true) 37public static YarpRoute WithTransformRequestHeader(this YarpRoute route, string headerName, string value, bool append = true) 47public static YarpRoute WithTransformRequestHeaderRouteValue(this YarpRoute route, string headerName, string routeValueKey, bool append = true) 57public static YarpRoute WithTransformRequestHeaderRemove(this YarpRoute route, string headerName) 68public static YarpRoute WithTransformRequestHeadersAllowed(this YarpRoute route, params string[] allowedHeaders)
ConfigurationBuilder\Transforms\ResponseTransformExtensions.cs (16)
17public static YarpRoute WithTransformCopyResponseHeaders(this YarpRoute route, bool copy = true) 27public static YarpRoute WithTransformCopyResponseTrailers(this YarpRoute route, bool copy = true) 37public static YarpRoute WithTransformResponseHeader(this YarpRoute route, string headerName, string value, bool append = true, ResponseCondition condition = ResponseCondition.Success) 47public static YarpRoute WithTransformResponseHeaderRemove(this YarpRoute route, string headerName, ResponseCondition condition = ResponseCondition.Success) 58public static YarpRoute WithTransformResponseHeadersAllowed(this YarpRoute route, params string[] allowedHeaders) 68public static YarpRoute WithTransformResponseTrailer(this YarpRoute route, string headerName, string value, bool append = true, ResponseCondition condition = ResponseCondition.Success) 78public static YarpRoute WithTransformResponseTrailerRemove(this YarpRoute route, string headerName, ResponseCondition condition = ResponseCondition.Success) 89public static YarpRoute WithTransformResponseTrailersAllowed(this YarpRoute route, params string[] allowedHeaders)
ConfigurationBuilder\YarpConfigurationBuilder.cs (3)
14public YarpRoute AddRoute(string path, YarpCluster cluster) 17var route = new YarpRoute(cluster, routeId); 80internal YarpRoute AddRoute(string path, object destination)
ConfigurationBuilder\YarpRoute.cs (32)
48public static YarpRoute WithMatch(this YarpRoute route, RouteMatch match) 58internal static YarpRoute WithMatch(this YarpRoute route, YarpRouteMatch match) 68private static YarpRoute ConfigureMatch(this YarpRoute route, Func<RouteMatch, RouteMatch> match) 78public static YarpRoute WithMatchPath(this YarpRoute route, string path) 88public static YarpRoute WithMatchMethods(this YarpRoute route, params string[] methods) 99public static YarpRoute WithMatchHeaders(this YarpRoute route, params RouteHeader[] headers) 109internal static YarpRoute WithMatchHeaders(this YarpRoute route, params YarpRouteHeaderMatch[] headers) 122public static YarpRoute WithMatchHosts(this YarpRoute route, params string[] hosts) 133public static YarpRoute WithMatchRouteQueryParameter(this YarpRoute route, params RouteQueryParameter[] queryParameters) 143internal static YarpRoute WithMatchRouteQueryParameter(this YarpRoute route, params YarpRouteQueryParameterMatch[] queryParameters) 157public static YarpRoute WithOrder(this YarpRoute route, int? order) 167public static YarpRoute WithMaxRequestBodySize(this YarpRoute route, long maxRequestBodySize) 177public static YarpRoute WithMetadata(this YarpRoute route, IReadOnlyDictionary<string, string>? metadata) 187public static YarpRoute WithTransforms(this YarpRoute route, IReadOnlyList<IReadOnlyDictionary<string, string>>? transforms) 198public static YarpRoute WithTransform(this YarpRoute route, Action<IDictionary<string, string>> createTransform) 216internal static YarpRoute WithTransform(this YarpRoute route, IReadOnlyDictionary<string, string> transform)
YarpEnvConfigGenerator.cs (1)
15public static void PopulateEnvVariables(Dictionary<string, object> environmentVariables, List<YarpRoute> routes, List<YarpCluster> clusters)
YarpResource.cs (1)
15internal List<YarpRoute> Routes { get; } = [];
Aspire.Hosting.Yarp.Tests (4)
YarpClusterTests.cs (4)
257var route = config.AddRoute("/string/{**catchall}", (object)"https://example.net"); 260var storedRoute = Assert.Single(yarp.Resource.Routes); 278var route = config.AddCatchAllRoute((object)"https://example.org"); 281var storedRoute = Assert.Single(yarp.Resource.Routes);