51 references to _options
Aspire.Hosting.Azure (51)
Provisioning\Internal\BaseProvisioningContextProvider.cs (14)
80var subscriptionId = _options.SubscriptionId ?? throw new MissingConfigurationException("An Azure subscription id is required. Set the Azure:SubscriptionId configuration value."); 96if (string.IsNullOrEmpty(_options.Location)) 107if (string.IsNullOrEmpty(_options.ResourceGroup)) 119resourceGroupName = _options.ResourceGroup; 120createIfAbsent = _options.AllowResourceGroupCreation ?? false; 127_options.AllowResourceGroupCreation = true; 134var location = new AzureLocation(_options.Location); 165azureSection["Location"] = _options.Location; 166azureSection["SubscriptionId"] = _options.SubscriptionId; 168if (!string.IsNullOrEmpty(_options.TenantId)) 170azureSection["TenantId"] = _options.TenantId; 172if (_options.AllowResourceGroupCreation.HasValue) 174azureSection["AllowResourceGroupCreation"] = _options.AllowResourceGroupCreation.Value; 271return await TryGetSubscriptionsAsync(_options.TenantId, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (20)
47if (!string.IsNullOrWhiteSpace(_options.ResourceGroupPrefix)) 49prefix = _options.ResourceGroupPrefix; 85while (_options.Location == null || _options.SubscriptionId == null) 88if (_options.TenantId == null && _options.SubscriptionId == null) 91if (_options.TenantId == null) 97if (_options.SubscriptionId == null) 100if (_options.SubscriptionId == null) 106if (_options.Location == null) 109if (_options.Location == null) 177_options.TenantId = result.Data[TenantName].Value; 212_options.TenantId = manualResult.Data[TenantName].Value; 233(subscriptionOptions, fetchSucceeded) = await TryGetSubscriptionsAsync(_options.TenantId, cancellationToken).ConfigureAwait(false); 276_options.SubscriptionId = result.Data[SubscriptionIdName].Value; 311_options.SubscriptionId = manualResult.Data[SubscriptionIdName].Value; 332(locationOptions, fetchSucceeded) = await TryGetLocationsAsync(_options.SubscriptionId!, cancellationToken).ConfigureAwait(false); 389_options.Location = result.Data[LocationName].Value; 390_options.ResourceGroup = result.Data[ResourceGroupName].Value; 391_options.AllowResourceGroupCreation = true;
Provisioning\Internal\RunModeProvisioningContextProvider.cs (17)
46if (!string.IsNullOrWhiteSpace(_options.ResourceGroupPrefix)) 48prefix = _options.ResourceGroupPrefix; 68(!string.IsNullOrEmpty(_options.Location) && !string.IsNullOrEmpty(_options.SubscriptionId))) 104while (_options.Location == null || _options.SubscriptionId == null) 129if (string.IsNullOrEmpty(_options.SubscriptionId)) 161InputType = string.IsNullOrEmpty(_options.SubscriptionId) ? InputType.Choice : InputType.Text, 166Disabled = !string.IsNullOrEmpty(_options.SubscriptionId), 167Value = _options.SubscriptionId, 172if (!string.IsNullOrEmpty(_options.SubscriptionId)) 189DependsOnInputs = string.IsNullOrEmpty(_options.SubscriptionId) ? [TenantName] : [] 264_options.TenantId = tenantInput.Value; 266_options.Location = result.Data[LocationName].Value; 267_options.SubscriptionId ??= result.Data[SubscriptionIdName].Value; 268_options.ResourceGroup = result.Data[ResourceGroupName].Value; 269_options.AllowResourceGroupCreation = true; // Allow the creation of the resource group if it does not exist.