1 instantiation of DevTunnelPortResource
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
579
var portResource = new
DevTunnelPortResource
(
54 references to DevTunnelPortResource
Aspire.Hosting.DevTunnels (26)
DevTunnelHealthCheck.cs (2)
34
foreach (
var
portResource in _tunnelResource.Ports)
50
foreach (
var
portResource in _tunnelResource.Ports)
DevTunnelPortHealthCheck.cs (2)
9
internal sealed class DevTunnelPortHealthCheck(
DevTunnelPortResource
portResource) : IHealthCheck
11
private readonly
DevTunnelPortResource
_portResource = portResource ?? throw new ArgumentNullException(nameof(portResource));
DevTunnelResource.cs (2)
37
internal List<
DevTunnelPortResource
> Ports { get; } = [];
61
/// Initializes a new instance of the <see cref="
DevTunnelPortResource
"/> class, representing a single forwarded endpoint/port on a dev tunnel.
DevTunnelResourceBuilderExtensions.cs (20)
155
foreach (
var
portResource in tunnelResource.Ports)
187
async Task StartPortAsync(
DevTunnelPortResource
portResource)
409
var
portResource = tunnelBuilder.Resource.Ports
432
var
portResource = tunnelBuilder.Resource.Ports
491
foreach (
var
port in tunnelResource.Resource.Ports.Where(p => p.TargetEndpoint.Resource == targetResource.Resource))
579
var
portResource = new DevTunnelPortResource(
607
DevTunnelPortResource
.ShowTunnelUrlsCommandName,
637
if (urls.FirstOrDefault(u => string.Equals(u.Endpoint?.EndpointName,
DevTunnelPortResource
.TunnelEndpointName, StringComparisons.EndpointAnnotationName)
645
if (urls.FirstOrDefault(u => string.Equals(u.Endpoint?.EndpointName,
DevTunnelPortResource
.TunnelEndpointName, StringComparisons.EndpointAnnotationName)
658
var
portResource = (
DevTunnelPortResource
)context.Resource;
739
: string.Equals(u.Name,
DevTunnelPortResource
.TunnelEndpointName, StringComparisons.EndpointAnnotationName)
798
private static async Task<ExecuteCommandResult> ShowTunnelUrlsAsync(
DevTunnelPortResource
portResource, ExecuteCommandContext context)
833
private static List<ResourcePropertySnapshot> GetUrlProperties(
DevTunnelPortResource
portResource)
842
new(
DevTunnelPortResource
.TunnelUrlPropertyName, NormalizeUrl(portUri))
851
properties.Add(new(
DevTunnelPortResource
.InspectUrlPropertyName, inspectUrl)
860
properties.Add(new(
DevTunnelPortResource
.LocalEndpointUrlPropertyName, localUrl)
882
name is
DevTunnelPortResource
.TunnelUrlPropertyName
883
or
DevTunnelPortResource
.InspectUrlPropertyName
884
or
DevTunnelPortResource
.LocalEndpointUrlPropertyName;
Aspire.Hosting.DevTunnels.Tests (26)
DevTunnelResourceBuilderExtensionsTests.cs (26)
33
var
tunnelPort = tunnel.Resource.Ports.FirstOrDefault();
98
var
port = tunnel.Resource.Ports.First();
112
var
tunnelPort = Assert.Single(tunnel.Resource.Ports);
127
var
tunnelPort = Assert.Single(tunnel.Resource.Ports);
146
var
tunnelPort = Assert.Single(tunnel.Resource.Ports);
166
var
tunnelPort = Assert.Single(tunnel.Resource.Ports);
216
var
tunnelPort = Assert.Single(tunnel.Resource.Ports);
289
Assert.Equal(
DevTunnelPortResource
.TunnelEndpointName, tunnelEndpoint.EndpointName);
306
Assert.Equal(
DevTunnelPortResource
.TunnelEndpointName, tunnelEndpoint.EndpointName);
324
Assert.Equal(
DevTunnelPortResource
.TunnelEndpointName, tunnelEndpoint.EndpointName);
402
Assert.Equal(
DevTunnelPortResource
.TunnelEndpointName, httpTunnelEndpoint.EndpointName);
403
Assert.Equal(
DevTunnelPortResource
.TunnelEndpointName, httpsTunnelEndpoint.EndpointName);
420
var
port = Assert.Single(tunnel.Resource.Ports);
428
var command = Assert.Single(port.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name ==
DevTunnelPortResource
.ShowTunnelUrlsCommandName);
510
var
port = Assert.Single(tunnel.Resource.Ports);
516
var command = Assert.Single(port.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name ==
DevTunnelPortResource
.ShowTunnelUrlsCommandName);
558
var
port = Assert.Single(tunnel.Resource.Ports);
564
var command = Assert.Single(port.Annotations.OfType<ResourceCommandAnnotation>(), a => a.Name ==
DevTunnelPortResource
.ShowTunnelUrlsCommandName);
618
var
tunnelPort = Assert.Single(tunnel.Resource.Ports);
652
var
port = Assert.Single(tunnel.Resource.Ports);
668
DevTunnelPortResource
.TunnelUrlPropertyName or
669
DevTunnelPortResource
.InspectUrlPropertyName or
670
DevTunnelPortResource
.LocalEndpointUrlPropertyName),
673
Assert.Equal(
DevTunnelPortResource
.TunnelUrlPropertyName, property.Name);
680
Assert.Equal(
DevTunnelPortResource
.InspectUrlPropertyName, property.Name);
687
Assert.Equal(
DevTunnelPortResource
.LocalEndpointUrlPropertyName, property.Name);
Aspire.Hosting.Tests (2)
Dcp\DcpExecutorTests.cs (2)
1077
var
tunnelPort = Assert.Single(distributedAppModel.Resources.OfType<
DevTunnelPortResource
>());