9 references to WithReference
Aspire.Hosting (2)
ResourceBuilderExtensions.cs (2)
927Uri uri when connectionName is null && !optional && name is not null => builder.WithReference(name, uri), 929string uriString when connectionName is null && !optional && name is not null => builder.WithReference(name, CreateUri(uriString)),
Aspire.Hosting.Tests (7)
ExternalServiceTests.cs (4)
575project.WithReference("api", uri); 586var ex = Assert.Throws<InvalidOperationException>(() => project.WithReference("api", uri)); 600var ex = Assert.Throws<InvalidOperationException>(() => project.WithReference("api", uri)); 615project.WithReference("api", uri);
WithReferenceTests.cs (3)
528Assert.Throws<InvalidOperationException>(() => builder.AddProject<ProjectA>("projecta").WithReference("petstore", new Uri("petstore.swagger.io", UriKind.Relative))); 537.WithReference("petstore", new Uri("https://petstore.swagger.io/v2")); 554.WithReference("petstore", new Uri("https://petstore.swagger.io/"));