1 write to DcpResource
Aspire.Hosting (1)
Dcp\AppResource.cs (1)
22DcpResource = dcpResource;
29 references to DcpResource
Aspire.Hosting (29)
Dcp\AppResource.cs (2)
15public string DcpResourceName => DcpResource.Metadata.Name; 28public Service Service => (Service)DcpResource;
Dcp\DcpExecutor.cs (27)
629var toCreate = _appResources.Where(r => r.DcpResource is ContainerNetwork); 632if (containerNetwork.DcpResource is ContainerNetwork cn) 641var toCreate = _appResources.Where(r => r.DcpResource is Container || r.DcpResource is Executable); 646var containersTask = CreateContainersAsync(toCreate.Where(ar => ar.DcpResource is Container), cancellationToken); 647var executablesTask = CreateExecutablesAsync(toCreate.Where(ar => ar.DcpResource is Executable), cancellationToken); 660var svc = (Service)sp.DcpResource; 903await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, resourceType, er.ModelResource, er.DcpResource.Metadata.Name)).ConfigureAwait(false); 911await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, resourceType, er.ModelResource, er.DcpResource.Metadata.Name)).ConfigureAwait(false); 945switch (er.DcpResource) 952throw new InvalidOperationException($"Expected an Executable resource, but got {er.DcpResource.Kind} instead"); 1184await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, KnownResourceTypes.Container, cr.ModelResource, cr.DcpResource.Metadata.Name)).ConfigureAwait(false); 1189await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, KnownResourceTypes.Container, cr.ModelResource, cr.DcpResource.Metadata.Name)).ConfigureAwait(false); 1217await _executorEvents.PublishAsync(new OnResourceStartingContext(cancellationToken, KnownResourceTypes.Container, cr.ModelResource, cr.DcpResource.Metadata.Name)).ConfigureAwait(false); 1219var dcpContainerResource = (Container)cr.DcpResource; 1493if (HasMultipleReplicas(appResource.DcpResource)) 1513if (HasMultipleReplicas(appResource.DcpResource) && ea.TargetPort is int) 1540var resourcesToCreate = _appResources.Select(r => r.DcpResource).OfType<RT>(); 1584switch (appResource.DcpResource) 1595throw new InvalidOperationException($"Unexpected resource type: {appResource.DcpResource.GetType().FullName}"); 1602.Where(r => r.DcpResource is not Service) 1603.SingleOrDefault(r => string.Equals(r.DcpResource.Metadata.Name, resourceName, StringComparisons.ResourceName)); 1615var resourceType = GetResourceType(appResource.DcpResource, appResource.ModelResource); 1619switch (appResource.DcpResource) 1628throw new InvalidOperationException($"Unexpected resource type: {appResource.DcpResource.GetType().FullName}"); 1634await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, resourceType, appResource.ModelResource, appResource.DcpResource.Metadata.Name)).ConfigureAwait(false); 1677await _executorEvents.PublishAsync(new OnResourceStartingContext(cancellationToken, resourceType, appResource.ModelResource, appResource.DcpResource.Metadata.Name)).ConfigureAwait(false);