573 references to DistributedApplicationModel
Aspire.Hosting (65)
ApplicationModel\AfterEndpointsAllocatedEvent.cs (7)
12/// <param name="model">The <see cref="DistributedApplicationModel"/> instance.</param> 14/// Subscribing to this event is analogous to implementing the <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.AfterEndpointsAllocatedAsync(DistributedApplicationModel, CancellationToken)"/> 16/// <see cref="DistributedApplicationModel"/> service which is passed in as an argument 17/// in <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.AfterEndpointsAllocatedAsync(Aspire.Hosting.ApplicationModel.DistributedApplicationModel, CancellationToken)"/>. 29public class AfterEndpointsAllocatedEvent(IServiceProvider services, DistributedApplicationModel model) : IDistributedApplicationEvent 37/// The <see cref="DistributedApplicationModel"/> instance. 39public DistributedApplicationModel Model { get; } = model;
ApplicationModel\AfterResourcesCreatedEvent.cs (7)
12/// <param name="model">The <see cref="DistributedApplicationModel"/> instance.</param> 14/// Subscribing to this event is analogous to implementing the <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.AfterResourcesCreatedAsync(DistributedApplicationModel, CancellationToken)"/> 16/// <see cref="DistributedApplicationModel"/> service which is passed in as an argument 17/// in <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.AfterResourcesCreatedAsync(Aspire.Hosting.ApplicationModel.DistributedApplicationModel, CancellationToken)"/>. 29public class AfterResourcesCreatedEvent(IServiceProvider services, DistributedApplicationModel model) : IDistributedApplicationEvent 37/// The <see cref="DistributedApplicationModel"/> instance. 39public DistributedApplicationModel Model { get; } = model;
ApplicationModel\BeforeStartEvent.cs (7)
12/// <param name="model">The <see cref="DistributedApplicationModel"/> instance.</param> 14/// Subscribing to this event is analogous to implementing the <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.BeforeStartAsync(Aspire.Hosting.ApplicationModel.DistributedApplicationModel, CancellationToken)"/> 16/// <see cref="DistributedApplicationModel"/> service which is passed in as an argument 17/// in <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.BeforeStartAsync(Aspire.Hosting.ApplicationModel.DistributedApplicationModel, CancellationToken)"/>. 29public class BeforeStartEvent(IServiceProvider services, DistributedApplicationModel model) : IDistributedApplicationEvent 37/// The <see cref="DistributedApplicationModel"/> instance. 39public DistributedApplicationModel Model { get; } = model;
ApplicationModel\DistributedApplicationModel.cs (1)
16/// Initializes a new instance of the <see cref="DistributedApplicationModel"/> class with the specified resource collection.
ApplicationModel\ProjectResourceExtensions.cs (2)
7/// Provides extension methods for <see cref="DistributedApplicationModel"/> to work with <see cref="ProjectResource"/> instances. 16public static IEnumerable<ProjectResource> GetProjectResources(this DistributedApplicationModel model)
ContainerResourceExtensions.cs (1)
18public static IEnumerable<IResource> GetContainerResources(this DistributedApplicationModel model)
Dashboard\DashboardLifecycleHook.cs (5)
49public Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken) 98private void AddDashboardResource(DistributedApplicationModel model) 228var model = context.ExecutionContext.ServiceProvider.GetRequiredService<DistributedApplicationModel>(); 292private static string? GetAllowedOriginsFromResourceEndpoints(DistributedApplicationModel model)
Dashboard\DashboardServiceHost.cs (1)
50DistributedApplicationModel applicationModel,
Dcp\DcpExecutor.cs (2)
48private readonly DistributedApplicationModel _model; 75DistributedApplicationModel model,
Dcp\DcpHost.cs (2)
22private readonly DistributedApplicationModel _applicationModel; 45DistributedApplicationModel applicationModel)
Devcontainers\DevcontainerPortForwardingLifecycleHook.cs (1)
27public async Task AfterEndpointsAllocatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken)
DistributedApplication.cs (3)
453var beforeStartEvent = new BeforeStartEvent(_host.Services, _host.Services.GetRequiredService<DistributedApplicationModel>()); 458var appModel = _host.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationBuilder.cs (2)
393var appModel = sp.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationRunner.cs (1)
16internal sealed class DistributedApplicationRunner(ILogger<DistributedApplicationRunner> logger, IHostApplicationLifetime lifetime, DistributedApplicationExecutionContext executionContext, DistributedApplicationModel model, IServiceProvider serviceProvider, IPublishingActivityProgressReporter activityReporter, IDistributedApplicationEventing eventing, BackchannelService backchannelService) : BackgroundService
ExecutableResourceExtensions.cs (1)
18public static IEnumerable<ExecutableResource> GetExecutableResources(this DistributedApplicationModel model)
Lifecycle\IDistributedApplicationLifecycleHook.cs (4)
19Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default) 30Task AfterEndpointsAllocatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default) 41/// <param name="appModel">The <see cref="DistributedApplicationModel"/> for the distributed application.</param> 44Task AfterResourcesCreatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
Orchestrator\ApplicationOrchestrator.cs (2)
19private readonly DistributedApplicationModel _model; 28public ApplicationOrchestrator(DistributedApplicationModel model,
Orchestrator\RelationshipEvaluator.cs (2)
13public static ILookup<IResource, IResource> GetParentChildLookup(DistributedApplicationModel model) 24private static IEnumerable<(IResource Child, IResource Parent)> GetParentChildRelationshipsFromAnnotations(DistributedApplicationModel model)
Publishing\AfterPublishEvent.cs (4)
13/// <param name="model">The <see cref="DistributedApplicationModel"/>.</param> 14public sealed class AfterPublishEvent(IServiceProvider services, DistributedApplicationModel model) : IDistributedApplicationEvent 22/// The <see cref="DistributedApplicationModel"/> instance. 24public DistributedApplicationModel Model { get; } = model;
Publishing\BeforePublishEvent.cs (4)
13/// <param name="model">The <see cref="DistributedApplicationModel"/>.</param> 14public sealed class BeforePublishEvent(IServiceProvider services, DistributedApplicationModel model) : IDistributedApplicationEvent 22/// The <see cref="DistributedApplicationModel"/> instance. 24public DistributedApplicationModel Model { get; } = model;
Publishing\IDistributedApplicationPublisher.cs (1)
19public Task PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken);
Publishing\ManifestPublisher.cs (3)
21public async Task PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken) 26protected virtual async Task PublishInternalAsync(DistributedApplicationModel model, CancellationToken cancellationToken) 61protected async Task WriteManifestAsync(DistributedApplicationModel model, Utf8JsonWriter jsonWriter, CancellationToken cancellationToken)
Publishing\ManifestPublishingContext.cs (2)
71internal async Task WriteModel(DistributedApplicationModel model, CancellationToken cancellationToken) 653private async Task WriteReferencedResources(DistributedApplicationModel model)
Aspire.Hosting.Azure (9)
AzurePublisher.cs (1)
42public async Task PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken)
AzurePublishingContext.cs (2)
45public async Task WriteModelAsync(DistributedApplicationModel model, CancellationToken cancellationToken = default) 61private Task WriteAzureArtifactsOutputAsync(DistributedApplicationModel model, CancellationToken _)
AzureResourcePreparer.cs (5)
24public async Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken) 52internal static List<(IResource Resource, IAzureResource AzureResource)> GetAzureResourcesFromAppModel(DistributedApplicationModel appModel) 89private static void EnsureNoRoleAssignmentAnnotations(DistributedApplicationModel appModel) 100private async Task BuildRoleAssignmentAnnotations(DistributedApplicationModel appModel, List<(IResource Resource, IAzureResource AzureResource)> azureResources, AzureProvisioningOptions options, CancellationToken cancellationToken) 413private async Task CreateGlobalRoleAssignments(DistributedApplicationModel appModel, Dictionary<AzureProvisioningResource, HashSet<RoleDefinition>> globalRoleAssignments, AzureProvisioningOptions provisioningOptions)
Provisioning\Provisioners\AzureProvisioner.cs (1)
47public async Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppsInfrastructure.cs (1)
21public async Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.Tests (133)
AzureBicepProvisionerTests.cs (2)
278var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureBicepResourceTests.cs (16)
253var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 290var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 800var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1824var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1939var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2366var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2669var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2827var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureContainerAppsTests.cs (64)
39var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 120var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 218var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 357var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 465var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 577var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 667var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 777var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1115var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1214var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1297var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1400var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1508var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1616var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1755var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1970var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2045var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2128var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2218var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2299var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2438var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2642var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2855var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3063var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3084var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3103var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3123var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3142var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3161var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3179var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3205var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3251var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBExtensionsTests.cs (2)
201var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureEventHubsExtensionsTests.cs (2)
285var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureFunctionsTests.cs (14)
150var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 171var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 269var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 299var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 391var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 474var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 539var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureKeyVaultTests.cs (2)
67var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureManifestUtils.cs (2)
18public static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(DistributedApplicationModel appModel, IResource resource) => 21private static async Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(DistributedApplicationModel appModel, IResource resource, bool skipPreparer)
AzurePostgresExtensionsTests.cs (4)
37var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 157var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzurePublisherTests.cs (2)
80var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureRedisExtensionsTests.cs (4)
38var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 111var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparerTests.cs (4)
62var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 152var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureSignalRExtensionsTests.cs (4)
22var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 111var model = app.Services.GetRequiredService<DistributedApplicationModel>();
ContainerRegistryTests.cs (7)
30var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 60var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 100var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 146public Task PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken)
ExistingAzureResourceTests.cs (2)
177var model = app.Services.GetRequiredService<DistributedApplicationModel>();
RoleAssignmentTests.cs (2)
478var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Containers.Tests (13)
ContainerResourceTests.cs (13)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 41var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 60var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 80var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 155var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 189var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 217var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 236var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 285var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
Aspire.Hosting.Docker (4)
DockerComposeInfrastructure.cs (1)
18public async Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
DockerComposePublisher.cs (1)
41public async Task PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken)
DockerComposePublishingContext.cs (2)
33internal async Task WriteModelAsync(DistributedApplicationModel model) 57private async Task WriteDockerComposeOutputAsync(DistributedApplicationModel model)
Aspire.Hosting.Docker.Tests (8)
DockerComposePublisherTests.cs (8)
63var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 173var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 262var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 310var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Elasticsearch.Tests (6)
AddElasticsearchTests.cs (6)
24var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 85var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 146var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Garnet.Tests (12)
AddGarnetTests.cs (12)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 51var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 80var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 344var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 365var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 382var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Kafka.Tests (4)
AddKafkaTests.cs (4)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 65var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Keycloak.Tests (2)
KeycloakResourceBuilderTests.cs (2)
24var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Kubernetes (4)
KubernetesInfrastructure.cs (1)
18public async Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
KubernetesPublisher.cs (1)
59public async Task PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken)
KubernetesPublishingContext.cs (2)
42internal async Task WriteModelAsync(DistributedApplicationModel model) 66private async Task WriteKubernetesOutputAsync(DistributedApplicationModel model)
Aspire.Hosting.Kubernetes.Tests (4)
KubernetesPublisherTests.cs (4)
76var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 124var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Milvus.Tests (6)
AddMilvusTests.cs (6)
26var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 56var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 185var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MongoDB.Tests (6)
AddMongoDBTests.cs (6)
24var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 52var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 83var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MySql.Tests (12)
AddMySqlTests.cs (12)
44var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 83var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 121var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 140var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 242await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 272var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 274builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
Aspire.Hosting.Nats.Tests (8)
AddNatsTests.cs (8)
47var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 76var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 94var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 136var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Oracle.Tests (10)
AddOracleTests.cs (10)
43var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 82var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 120var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 140var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 163var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.PostgreSQL (4)
PostgresBuilderExtensions.cs (4)
208var appModel = context.ServiceProvider.GetRequiredService<DistributedApplicationModel>(); 317var appModel = context.ServiceProvider.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.PostgreSQL.Tests (15)
AddPostgresTests.cs (15)
53var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 175var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 197var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 378var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 381await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 471await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 541var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 543await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
Aspire.Hosting.Python.Tests (6)
AddPythonAppTests.cs (6)
145var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 181var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 220var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Qdrant.Tests (8)
AddQdrantTests.cs (8)
46var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 85var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 118var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 284var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.RabbitMQ.Tests (6)
AddRabbitMQTests.cs (6)
51var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 103var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 137var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Redis.Tests (20)
AddRedisTests.cs (18)
31var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 59var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 90var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 122var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 269await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 407var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 426await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 450await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 471await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 623var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
RedisFunctionalTests.cs (2)
607var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Seq.Tests (6)
AddSeqTests.cs (6)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.SqlServer.Tests (8)
AddSqlServerTests.cs (8)
44var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 91var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 113var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 277var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Testing (2)
DistributedApplicationHostingTestingExtensions.cs (2)
78var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Testing.Tests (6)
TestingBuilderTests.cs (4)
99var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 161var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
TestingFactoryTests.cs (2)
43var appModel = _app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Tests (162)
AddParameterTests.cs (16)
25var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 62var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 96var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 146var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 203var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 268var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 298var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 336var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Backchannel\AppHostBackchannelTests.cs (1)
235public Task PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken)
Dashboard\DashboardLifecycleHookTests.cs (2)
46var model = new DistributedApplicationModel(new ResourceCollection()); 87var model = new DistributedApplicationModel(new ResourceCollection());
Dashboard\DashboardResourceTests.cs (26)
47var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 71var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 104var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 176var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 214var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 251var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 285var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 321var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 365var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 390var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 406var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 471var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 523var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpExecutorTests.cs (57)
35var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 60var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 144var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 187var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 236var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 268var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 300var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 333var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 370var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 390var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 424var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 458var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 522var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 544var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 580var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 678var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 784var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 829var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 866var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 901var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 961var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 982var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1018var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1055var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1092var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1122var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1159var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1181var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1213DistributedApplicationModel distributedAppModel,
DistributedApplicationBuilderTests.cs (4)
42var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 64var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationTests.cs (6)
317var tcs = new TaskCompletionSource<DistributedApplicationModel>(TaskCreationOptions.RunContinuationsAsynchronously); 324var appModel = await tcs.Task.DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 335private sealed class CheckAllocatedEndpointsLifecycleHook(TaskCompletionSource<DistributedApplicationModel> tcs) : IDistributedApplicationLifecycleHook 337public Task AfterEndpointsAllocatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default) 1187public async Task AfterEndpointsAllocatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken) 1192public async Task AfterResourcesCreatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken)
Helpers\CallbackLifecycleHook.cs (3)
10private readonly Func<DistributedApplicationModel, CancellationToken, Task> _beforeStartCallback; 12public CallbackLifecycleHook(Func<DistributedApplicationModel, CancellationToken, Task> beforeStartCallback) 17public Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
Helpers\JsonDocumentManifestPublisher.cs (1)
18protected override async Task PublishInternalAsync(DistributedApplicationModel model, CancellationToken cancellationToken)
Helpers\NoopPublisher.cs (1)
9public Task PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken)
KestrelConfigTests.cs (2)
360var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ApplicationOrchestratorTests.cs (9)
28var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 77var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 144var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 197var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 255DistributedApplicationModel distributedAppModel,
Orchestrator\RelationshipEvaluatorTests.cs (2)
29var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
ProjectResourceTests.cs (30)
71var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 185var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 212var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 230var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 246var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 294var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 314var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 357var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 379var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 404var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 434var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 453var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 477var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 527var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 622var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
WithEndpointTests.cs (2)
210var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Valkey.Tests (12)
AddValkeyTests.cs (12)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 51var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 80var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 99var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 116var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 334var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Playground.Tests (7)
AppHostTests.cs (2)
68var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationExtensions.cs (4)
101var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 130var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationTestFactory.cs (1)
53public Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
CustomResources.AppHost (1)
TestResource.cs (1)
34public Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
HealthChecksSandbox.AppHost (1)
Program.cs (1)
65public Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken)
Stress.AppHost (1)
TestResource.cs (1)
53public Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
TestProject.AppHost (1)
TestProgram.cs (1)
157public async Task AfterEndpointsAllocatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken)