9 references to WithReference
Aspire.Hosting (2)
ResourceBuilderExtensions.cs (2)
1178
Uri uri when connectionName is null && !optional && name is not null => builder.
WithReference
(name, uri),
1180
string uriString when connectionName is null && !optional && name is not null => builder.
WithReference
(name, CreateUri(uriString)),
Aspire.Hosting.Tests (7)
ExternalServiceTests.cs (4)
576
project.
WithReference
("api", uri);
587
var ex = Assert.Throws<InvalidOperationException>(() => project.
WithReference
("api", uri));
601
var ex = Assert.Throws<InvalidOperationException>(() => project.
WithReference
("api", uri));
616
project.
WithReference
("api", uri);
WithReferenceTests.cs (3)
796
Assert.Throws<InvalidOperationException>(() => AddProject<ProjectA>(builder, "projecta").
WithReference
("petstore", new Uri("petstore.swagger.io", UriKind.Relative)));
805
.
WithReference
("petstore", new Uri("https://petstore.swagger.io/v2"));
822
.
WithReference
("petstore", new Uri("https://petstore.swagger.io/"));