9 references to WithReference
Aspire.Hosting (2)
ResourceBuilderExtensions.cs (2)
1178Uri uri when connectionName is null && !optional && name is not null => builder.WithReference(name, uri), 1180string uriString when connectionName is null && !optional && name is not null => builder.WithReference(name, CreateUri(uriString)),
Aspire.Hosting.Tests (7)
ExternalServiceTests.cs (4)
576project.WithReference("api", uri); 587var ex = Assert.Throws<InvalidOperationException>(() => project.WithReference("api", uri)); 601var ex = Assert.Throws<InvalidOperationException>(() => project.WithReference("api", uri)); 616project.WithReference("api", uri);
WithReferenceTests.cs (3)
796Assert.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/"));