Skip to content
DocsTry Aspire
DocsTry

PathTransformExtensions Methods

ClassMethods4 members
Extensions for adding path transforms.
WithTransformPathPrefix(YarpRoute, PathString)Section titled WithTransformPathPrefix(YarpRoute, PathString)extensionYarpRoute
Adds the transform which will prefix the request path with the given value.
public static class PathTransformExtensions
{
public static YarpRoute WithTransformPathPrefix(
this YarpRoute route,
PathString prefix)
{
// ...
}
}
prefixPathString
This overload is not available in polyglot app hosts. Use the string-based overload instead.
WithTransformPathRemovePrefix(YarpRoute, PathString)Section titled WithTransformPathRemovePrefix(YarpRoute, PathString)extensionYarpRoute
Adds the transform which will remove the matching prefix from the request path.
public static class PathTransformExtensions
{
public static YarpRoute WithTransformPathRemovePrefix(
this YarpRoute route,
PathString prefix)
{
// ...
}
}
prefixPathString
This overload is not available in polyglot app hosts. Use the string-based overload instead.
WithTransformPathRouteValues(YarpRoute, PathString)Section titled WithTransformPathRouteValues(YarpRoute, PathString)extensionYarpRoute
Adds the transform which will set the request path with the given value.
public static class PathTransformExtensions
{
public static YarpRoute WithTransformPathRouteValues(
this YarpRoute route,
PathString pattern)
{
// ...
}
}
patternPathString
This overload is not available in polyglot app hosts. Use the string-based overload instead.
WithTransformPathSet(YarpRoute, PathString)Section titled WithTransformPathSet(YarpRoute, PathString)extensionYarpRoute
Adds the transform which sets the request path with the given value.
public static class PathTransformExtensions
{
public static YarpRoute WithTransformPathSet(
this YarpRoute route,
PathString path)
{
// ...
}
}
pathPathString
This overload is not available in polyglot app hosts. Use the string-based overload instead.