328 references to DistributedApplicationModel
Aspire.Hosting (53)
ApplicationModel\AfterEndpointsAllocatedEvent.cs (7)
13/// <param name="model">The <see cref="DistributedApplicationModel"/> instance.</param> 15/// Subscribing to this event is analogous to implementing the <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.AfterEndpointsAllocatedAsync(DistributedApplicationModel, CancellationToken)"/> 17/// <see cref="DistributedApplicationModel"/> service which is passed in as an argument 18/// in <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.AfterEndpointsAllocatedAsync(Aspire.Hosting.ApplicationModel.DistributedApplicationModel, CancellationToken)"/>. 31public class AfterEndpointsAllocatedEvent(IServiceProvider services, DistributedApplicationModel model) : IDistributedApplicationEvent 39/// The <see cref="DistributedApplicationModel"/> instance. 41public DistributedApplicationModel Model { get; } = model;
ApplicationModel\AfterResourcesCreatedEvent.cs (7)
13/// <param name="model">The <see cref="DistributedApplicationModel"/> instance.</param> 15/// Subscribing to this event is analogous to implementing the <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.AfterResourcesCreatedAsync(DistributedApplicationModel, CancellationToken)"/> 17/// <see cref="DistributedApplicationModel"/> service which is passed in as an argument 18/// in <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.AfterResourcesCreatedAsync(Aspire.Hosting.ApplicationModel.DistributedApplicationModel, CancellationToken)"/>. 31public class AfterResourcesCreatedEvent(IServiceProvider services, DistributedApplicationModel model) : IDistributedApplicationEvent 39/// The <see cref="DistributedApplicationModel"/> instance. 41public DistributedApplicationModel Model { get; } = model;
ApplicationModel\BeforeStartEvent.cs (7)
13/// <param name="model">The <see cref="DistributedApplicationModel"/> instance.</param> 15/// Subscribing to this event is analogous to implementing the <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.BeforeStartAsync(Aspire.Hosting.ApplicationModel.DistributedApplicationModel, CancellationToken)"/> 17/// <see cref="DistributedApplicationModel"/> service which is passed in as an argument 18/// in <see cref="Aspire.Hosting.Lifecycle.IDistributedApplicationLifecycleHook.BeforeStartAsync(Aspire.Hosting.ApplicationModel.DistributedApplicationModel, CancellationToken)"/>. 31public class BeforeStartEvent(IServiceProvider services, DistributedApplicationModel model) : IDistributedApplicationEvent 39/// The <see cref="DistributedApplicationModel"/> instance. 41public DistributedApplicationModel Model { get; } = model;
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 (4)
34public Task BeforeStartAsync(DistributedApplicationModel model, CancellationToken cancellationToken) 77private void AddDashboardResource(DistributedApplicationModel model) 166var model = context.ExecutionContext.ServiceProvider.GetRequiredService<DistributedApplicationModel>();
Dashboard\DashboardServiceHost.cs (1)
51DistributedApplicationModel applicationModel,
Dcp\ApplicationExecutor.cs (3)
65DistributedApplicationModel model, 90private readonly DistributedApplicationModel _model = model; 189private static ILookup<IResource?, IResourceWithParent> GetParentChildLookup(DistributedApplicationModel model)
Dcp\DcpDependencyCheck.cs (2)
20private readonly DistributedApplicationModel _applicationModel; 27DistributedApplicationModel applicationModel,
DistributedApplication.cs (3)
349var beforeStartEvent = new BeforeStartEvent(_host.Services, _host.Services.GetRequiredService<DistributedApplicationModel>()); 354var appModel = _host.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationRunner.cs (1)
11internal sealed class DistributedApplicationRunner(DistributedApplicationExecutionContext executionContext, DistributedApplicationModel model, IServiceProvider serviceProvider) : BackgroundService
ExecutableResourceExtensions.cs (1)
18public static IEnumerable<ExecutableResource> GetExecutableResources(this DistributedApplicationModel model)
Health\ResourceHealthCheckScheduler.cs (2)
13private readonly DistributedApplicationModel _model; 16public ResourceHealthCheckScheduler(ResourceNotificationService resourceNotificationService, DistributedApplicationModel model)
Health\ResourceNotificationHealthCheckPublisher.cs (1)
9internal class ResourceNotificationHealthCheckPublisher(DistributedApplicationModel model, ResourceNotificationService resourceNotificationService) : IHealthCheckPublisher
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)
ParameterResourceBuilderExtensions.cs (1)
134public Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken)
Publishing\IDistributedApplicationPublisher.cs (1)
19public Task PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken);
Publishing\ManifestPublisher.cs (3)
24public async Task PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken) 30protected virtual async Task PublishInternalAsync(DistributedApplicationModel model, CancellationToken cancellationToken) 48protected async Task WriteManifestAsync(DistributedApplicationModel model, Utf8JsonWriter jsonWriter, CancellationToken cancellationToken)
Publishing\ManifestPublishingContext.cs (2)
69internal async Task WriteModel(DistributedApplicationModel model, CancellationToken cancellationToken) 633private async Task WriteReferencedResources(DistributedApplicationModel model)
Aspire.Hosting.AWS (1)
AWSLifecycleHook.cs (1)
19public Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure (2)
Provisioning\Provisioners\AzureProvisioner.cs (2)
44private static List<(IResource Resource, IAzureResource AzureResource)> GetAzureResourcesFromAppModel(DistributedApplicationModel appModel) 70public async Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
Aspire.Hosting.Containers.Tests (9)
ContainerResourceTests.cs (9)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 41var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 111var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 145var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 173var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 192var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 241var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
Aspire.Hosting.Dapr (2)
DaprDistributedApplicationLifecycleHook.cs (2)
35public async Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default) 345private async Task<IReadOnlyDictionary<string, string>> StartOnDemandDaprComponentsAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken)
Aspire.Hosting.Dapr.Tests (4)
DaprTests.cs (4)
38var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 137var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Elasticsearch.Tests (6)
AddElasticsearchTests.cs (6)
24var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 86var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 147var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Garnet.Tests (6)
AddGarnetTests.cs (6)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var 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.Milvus.Tests (6)
AddMilvusTests.cs (6)
27var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 58var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 191var 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>(); 84var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 122var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 141var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 243await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 282var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 284builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
Aspire.Hosting.Nats.Tests (4)
AddNatsTests.cs (4)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 53var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Oracle.Tests (10)
AddOracleTests.cs (10)
43var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 83var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 121var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 141var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 165var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.PostgreSQL.Tests (12)
AddPostgresTests.cs (12)
53var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 108var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 176var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 199var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 467await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 513var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 515await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
Aspire.Hosting.Python.Tests (6)
AddPythonProjectTests.cs (6)
140var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 176var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 215var 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>(); 119var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 287var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.RabbitMQ.Tests (6)
AddRabbitMQTests.cs (6)
51var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 104var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 138var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Redis.Tests (8)
AddRedisTests.cs (8)
31var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 59var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 88var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 216await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 240await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new (app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
Aspire.Hosting.SqlServer.Tests (6)
AddSqlServerTests.cs (6)
44var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 92var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 115var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Testing (2)
DistributedApplicationHostingTestingExtensions.cs (2)
66var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Testing.Tests (6)
TestingBuilderTests.cs (4)
85var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 131var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
TestingFactoryTests.cs (2)
37var appModel = _app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Tests (131)
AddParameterTests.cs (10)
25var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 62var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 109var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 131var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 176var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Dashboard\DashboardLifecycleHookTests.cs (1)
48var model = new DistributedApplicationModel(new ResourceCollection());
Dashboard\DashboardResourceTests.cs (26)
41var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 63var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 92var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 160var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 194var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 227var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 257var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 287var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 323var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 346var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 360var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 421var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 473var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\ApplicationExecutorTests.cs (45)
35var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 57var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 89var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 121var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 154var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 191var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 211var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 245var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 279var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 343var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 365var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 396var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 494var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 601var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 641var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 712var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 730var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 765var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 825var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 846var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 882var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 919var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 942DistributedApplicationModel distributedAppModel,
DistributedApplicationBuilderTests.cs (4)
40var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 58var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationTests.cs (6)
150var tcs = new TaskCompletionSource<DistributedApplicationModel>(TaskCreationOptions.RunContinuationsAsynchronously); 157var appModel = await tcs.Task.WaitAsync(TimeSpan.FromSeconds(10)); 168private sealed class CheckAllocatedEndpointsLifecycleHook(TaskCompletionSource<DistributedApplicationModel> tcs) : IDistributedApplicationLifecycleHook 170public Task AfterEndpointsAllocatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default) 836public async Task AfterEndpointsAllocatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken) 841public 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)
19protected override async Task PublishInternalAsync(DistributedApplicationModel model, CancellationToken cancellationToken)
Helpers\NoopPublisher.cs (1)
12public Task PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken)
KestrelConfigTests.cs (2)
359var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
ProjectResourceTests.cs (30)
68var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 182var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 209var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 227var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 243var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 291var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 311var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 354var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 376var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 401var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 431var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 450var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 474var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 524var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 616var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
WithEndpointTests.cs (2)
209var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Valkey.Tests (6)
AddValkeyTests.cs (6)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Playground.Tests (7)
AppHostTests.cs (2)
83var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationExtensions.cs (4)
102var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 132var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationTestFactory.cs (1)
60public Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
CustomResources.AppHost (1)
TestResource.cs (1)
34public Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
Stress.AppHost (1)
TestResource.cs (1)
34public Task BeforeStartAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken = default)
TestProject.AppHost (1)
TestProgram.cs (1)
154public async Task AfterEndpointsAllocatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken)