Class StoragePathServiceCollectionExtensions
Extension methods for registering storage paths via Microsoft.Extensions.DependencyInjection.IServiceCollection.
public static class StoragePathServiceCollectionExtensions
- Inheritance
-
objectStoragePathServiceCollectionExtensions
Remarks
Registered paths are collected during service configuration and applied to IStoragePathRegistry during module initialization.
These methods can be used both in application startup (builder.Services) and
in module OnPreInit (parameters.Services).
Methods
AddStoragePathRegistration(IServiceCollection, string, PathType)
Registers a single storage path in the IStoragePathRegistry.
public static IServiceCollection AddStoragePathRegistration(this IServiceCollection services, string path, PathType pathType)
Parameters
servicesIServiceCollectionThe Microsoft.Extensions.DependencyInjection.IServiceCollection to add the registration to.
pathstringThe path to register (e.g.,
"~/assets/custom").pathTypePathTypeThe type of the path.
Returns
- IServiceCollection
The same Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained.
Exceptions
- ArgumentNullException
Thrown when
servicesis null.- ArgumentException
Thrown when
pathis null, empty, or whitespace.