Home

Awesome

Namotion.Storage

Storage | Messaging | Reflection

Azure DevOps Azure DevOps Discord

<img align="left" src="https://raw.githubusercontent.com/RicoSuter/Namotion.Reflection/master/assets/Icon.png" width="48px" height="48px">

The Namotion.Storage .NET libraries provide abstractions and implementations for storage services like blob storages, file systems or object storages.

By programming against a storage abstraction you enable the following scenarios:

Usage

In your application root, create an IBlobStorage instance with an actual implementation package and retrieve a blob container:

var storage = AzureBlobStorage.CreateFromConnectionString("MyConnectionString");
IBlobContainer container = storage.GetContainer("MyContainer");
IBlobContainer<Person> typedContainer = container.WithBlobType<Person>();

await typedContainer.WriteJsonAsync("MyPath", new Person { ... });
var person = await typedContainer.ReadJsonAsync("MyPath");

In your business service classes you should then only use the abstraction interfaces like IBlobContainer or IObjectStorage, etc.

Core packages

Namotion.Storage.Abstractions

Nuget Apimundo

Blobs

Inject IBlobStorage or IBlobContainer but do not get a container from a blob storage in the consuming class (violates SRP).

Internal:

The idea behind the generic interfaces is to allow multiple instance registrations, read Dependency Injection in .NET: A way to work around missing named registrations for more information.

Objects

Namotion.Storage.Json

Nuget Apimundo

Extension methods:

Implementation packages

The following packages should only be used in the head project, i.e. directly in your application bootstrapping project where the dependency injection container is initialized.

Namotion.Storage

Nuget Apimundo

Implementations:

Extensions:

Namotion.Storage.Azure.Storage.Blob

Nuget Apimundo

Implementations:

Namotion.Storage.Ftp

Nuget Apimundo

Implementations: