44 references to AzureStorageResource
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
149var storage = storageResource.Resource;
Aspire.Hosting.Azure.Functions (4)
AzureFunctionsProjectResourceExtensions.cs (3)
42var storage = builder.Resources 43.OfType<AzureStorageResource>() 190public static IResourceBuilder<AzureFunctionsProjectResource> WithHostStorage(this IResourceBuilder<AzureFunctionsProjectResource> builder, IResourceBuilder<AzureStorageResource> storage)
AzureFunctionsResource.cs (1)
19internal AzureStorageResource? HostStorage { get; set; }
Aspire.Hosting.Azure.Storage (30)
AzureBlobStorageResource.cs (6)
12/// <param name="storage">The <see cref="AzureStorageResource"/> that the resource is stored in.</param> 13public class AzureBlobStorageResource(string name, AzureStorageResource storage) : Resource(name), 15IResourceWithParent<AzureStorageResource>, 21public AzureStorageResource Parent => storage; 36target[$"{AzureStorageResource.BlobsConnectionKeyPrefix}__{connectionName}__ConnectionString"] = connectionString; 48target[$"{AzureStorageResource.BlobsConnectionKeyPrefix}__{connectionName}__ServiceUri"] = Parent.BlobEndpoint;
AzureQueueStorageResource.cs (6)
12/// <param name="storage">The <see cref="AzureStorageResource"/> that the resource is stored in.</param> 13public class AzureQueueStorageResource(string name, AzureStorageResource storage) : Resource(name), 15IResourceWithParent<AzureStorageResource>, 21public AzureStorageResource Parent => storage; 35target[$"{AzureStorageResource.QueuesConnectionKeyPrefix}__{connectionName}__ConnectionString"] = connectionString; 42target[$"{AzureStorageResource.QueuesConnectionKeyPrefix}__{connectionName}__ServiceUri"] = Parent.QueueEndpoint;
AzureStorageEmulatorResource.cs (3)
9/// Wraps an <see cref="AzureStorageResource" /> in a type that exposes container extension methods. 12public class AzureStorageEmulatorResource(AzureStorageResource innerResource) : ContainerResource(innerResource.Name), IResource 14private readonly AzureStorageResource _innerResource = innerResource;
AzureStorageExtensions.cs (11)
27public static IResourceBuilder<AzureStorageResource> AddAzureStorage(this IDistributedApplicationBuilder builder, [ResourceName] string name) 75var resource = new AzureStorageResource(name, configureInfrastructure); 81/// Configures an Azure Storage resource to be emulated using Azurite. This resource requires an <see cref="AzureStorageResource"/> to be added to the application model. 89public static IResourceBuilder<AzureStorageResource> RunAsEmulator(this IResourceBuilder<AzureStorageResource> builder, Action<IResourceBuilder<AzureStorageEmulatorResource>>? configureContainer = null) 216/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for <see cref="AzureStorageResource"/>/</param> 219public static IResourceBuilder<AzureBlobStorageResource> AddBlobs(this IResourceBuilder<AzureStorageResource> builder, [ResourceName] string name) 228/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for <see cref="AzureStorageResource"/>/</param> 231public static IResourceBuilder<AzureTableStorageResource> AddTables(this IResourceBuilder<AzureStorageResource> builder, [ResourceName] string name) 240/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for <see cref="AzureStorageResource"/>/</param> 243public static IResourceBuilder<AzureQueueStorageResource> AddQueues(this IResourceBuilder<AzureStorageResource> builder, [ResourceName] string name)
AzureTableStorageResource.cs (4)
12/// <param name="storage">The <see cref="AzureStorageResource"/> that the resource is stored in.</param> 13public class AzureTableStorageResource(string name, AzureStorageResource storage) : Resource(name), 15IResourceWithParent<AzureStorageResource> 20public AzureStorageResource Parent => storage;
Aspire.Hosting.Azure.Tests (9)
AzureFunctionsTests.cs (9)
22resource is AzureStorageResource && resource.Name.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName)); 106var storageResources = Assert.Single(builder.Resources.OfType<AzureStorageResource>()); 125Assert.DoesNotContain(model.Resources.OfType<AzureStorageResource>(), 127var storageResource = Assert.Single(model.Resources.OfType<AzureStorageResource>()); 146Assert.Single(model.Resources.OfType<AzureStorageResource>(), 158var resource = Assert.Single(builder.Resources.OfType<AzureStorageResource>());