44 references to AzureStorageResource
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
149
var
storage = storageResource.Resource;
Aspire.Hosting.Azure.Functions (4)
AzureFunctionsProjectResourceExtensions.cs (3)
42
var
storage = builder.Resources
43
.OfType<
AzureStorageResource
>()
190
public static IResourceBuilder<AzureFunctionsProjectResource> WithHostStorage(this IResourceBuilder<AzureFunctionsProjectResource> builder, IResourceBuilder<
AzureStorageResource
> storage)
AzureFunctionsResource.cs (1)
19
internal
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>
13
public class AzureBlobStorageResource(string name,
AzureStorageResource
storage) : Resource(name),
15
IResourceWithParent<
AzureStorageResource
>,
21
public
AzureStorageResource
Parent => storage;
36
target[$"{
AzureStorageResource
.BlobsConnectionKeyPrefix}__{connectionName}__ConnectionString"] = connectionString;
48
target[$"{
AzureStorageResource
.BlobsConnectionKeyPrefix}__{connectionName}__ServiceUri"] = Parent.BlobEndpoint;
AzureQueueStorageResource.cs (6)
12
/// <param name="storage">The <see cref="
AzureStorageResource
"/> that the resource is stored in.</param>
13
public class AzureQueueStorageResource(string name,
AzureStorageResource
storage) : Resource(name),
15
IResourceWithParent<
AzureStorageResource
>,
21
public
AzureStorageResource
Parent => storage;
35
target[$"{
AzureStorageResource
.QueuesConnectionKeyPrefix}__{connectionName}__ConnectionString"] = connectionString;
42
target[$"{
AzureStorageResource
.QueuesConnectionKeyPrefix}__{connectionName}__ServiceUri"] = Parent.QueueEndpoint;
AzureStorageEmulatorResource.cs (3)
9
/// Wraps an <see cref="
AzureStorageResource
" /> in a type that exposes container extension methods.
12
public class AzureStorageEmulatorResource(
AzureStorageResource
innerResource) : ContainerResource(innerResource.Name), IResource
14
private readonly
AzureStorageResource
_innerResource = innerResource;
AzureStorageExtensions.cs (11)
27
public static IResourceBuilder<
AzureStorageResource
> AddAzureStorage(this IDistributedApplicationBuilder builder, [ResourceName] string name)
75
var
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.
89
public 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>
219
public 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>
231
public 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>
243
public 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>
13
public class AzureTableStorageResource(string name,
AzureStorageResource
storage) : Resource(name),
15
IResourceWithParent<
AzureStorageResource
>
20
public
AzureStorageResource
Parent => storage;
Aspire.Hosting.Azure.Tests (9)
AzureFunctionsTests.cs (9)
22
resource is
AzureStorageResource
&& resource.Name.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName));
106
var
storageResources = Assert.Single(builder.Resources.OfType<
AzureStorageResource
>());
125
Assert.DoesNotContain(model.Resources.OfType<
AzureStorageResource
>(),
127
var
storageResource = Assert.Single(model.Resources.OfType<
AzureStorageResource
>());
146
Assert.Single(model.Resources.OfType<
AzureStorageResource
>(),
158
var
resource = Assert.Single(builder.Resources.OfType<
AzureStorageResource
>());