Innovayse.StorageManager 2.0.8

dotnet add package Innovayse.StorageManager --version 2.0.8
                    
NuGet\Install-Package Innovayse.StorageManager -Version 2.0.8
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Innovayse.StorageManager" Version="2.0.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Innovayse.StorageManager" Version="2.0.8" />
                    
Directory.Packages.props
<PackageReference Include="Innovayse.StorageManager" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Innovayse.StorageManager --version 2.0.8
                    
#r "nuget: Innovayse.StorageManager, 2.0.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Innovayse.StorageManager@2.0.8
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Innovayse.StorageManager&version=2.0.8
                    
Install as a Cake Addin
#tool nuget:?package=Innovayse.StorageManager&version=2.0.8
                    
Install as a Cake Tool

StorageManager

A comprehensive .NET storage management solution with support for multiple storage providers, encryption, compression, and caching. Everything you need in one complete package.

๐Ÿš€ Quick Start

Installation

Install the complete StorageManager package:

dotnet add package Innovayse.StorageManager

Basic Usage

Console Application
using StorageManager.Core.Interfaces;
using StorageManager.Services;
using StorageManager.Providers.Local;

// Configure local storage
var options = new LocalStorageDriverOptions
{
    RootPath = @"C:\MyStorage",
    IsReadOnly = false
};

// Create storage manager
var storageManager = new DefaultStorageManager();
storageManager.RegisterDriver("local", new LocalStorageDriver(options));
await storageManager.SwitchDriverAsync("local");

// Use storage
await storageManager.UploadAsync("test.txt", "Hello World!"u8.ToArray());
var content = await storageManager.GetAsync("test.txt");
var files = await storageManager.ListAsync("/");
ASP.NET Core Application
using StorageManager.Extensions;

var builder = WebApplication.CreateBuilder(args);

// Add StorageManager with all components
builder.Services.AddStorageManagerMinimal();

// Configure local storage
builder.Services.Configure<LocalStorageDriverOptions>(options =>
{
    options.RootPath = @"C:\Storage";
    options.IsReadOnly = false;
});

var app = builder.Build();

// Use in endpoints
app.MapPost("/upload", async (IFormFile file, IStorageManager storageManager) =>
{
    using var stream = file.OpenReadStream();
    var result = await storageManager.PutAsync(file.FileName, stream);
    return Results.Ok(new { Path = result.Path, Size = result.Size });
});

app.MapGet("/files", async (IStorageManager storageManager) =>
{
    var files = await storageManager.ListAsync("/");
    return Results.Ok(files);
});

app.Run();

๐Ÿ“ฆ What's Included

Innovayse.StorageManager contains all components in one package:

Component Description
๐Ÿ—๏ธ Core Interfaces, models, enums, and base functionality
โš™๏ธ Services Storage manager implementation and core services
๐Ÿ”Œ Providers All storage drivers (Local, Cloud, Database, Memory)
๐Ÿ”ง Extensions ASP.NET Core integration and dependency injection
๐Ÿ“‹ Configuration Settings, validation, and configuration models
๐Ÿ› ๏ธ Utilities Helper classes and utility functions

๐ŸŒŸ Key Features

๐Ÿ“ Storage Providers

  • Local File System - Fast local storage
  • AWS S3 - Amazon Simple Storage Service
  • Azure Blob Storage - Microsoft Azure cloud storage
  • Google Cloud Storage - Google Cloud Platform storage
  • SFTP - Secure File Transfer Protocol
  • Database Storage - SQL Server, PostgreSQL, MySQL
  • Redis - In-memory data structure store
  • Memory - In-memory storage for testing

๐Ÿ”’ Security

  • AES-256 Encryption - Industry-standard encryption
  • Configurable Keys - Custom encryption keys
  • Secure Dependencies - No known vulnerabilities

โšก Performance

  • GZip Compression - Reduce storage space
  • Intelligent Caching - Configurable caching strategies
  • Async/Await Support - Non-blocking operations
  • Streaming - Memory-efficient large file handling
  • Batch Operations - Process multiple files efficiently

๐Ÿ“Š Monitoring

  • Health Checks - Built-in storage health monitoring
  • Prometheus Metrics - Comprehensive metrics collection
  • Logging - Structured logging with Microsoft.Extensions.Logging
  • Performance Tracking - Operation timing and statistics

๐Ÿ”ง Integration

  • ASP.NET Core Ready - Built-in dependency injection
  • Configuration Support - appsettings.json integration
  • Validation - Input validation and error handling
  • Extensible - Easy to add custom providers

๐Ÿ“š Documentation

Getting Started

API Reference

Advanced Topics

Development

๐Ÿ› ๏ธ Advanced Usage

Encryption Example

// Store encrypted content
await storageManager.PutEncryptedAsync(
    "sensitive-data.txt", 
    contentStream, 
    "my-secret-key"
);

// Retrieve and decrypt
var decryptedStream = await storageManager.GetDecryptedAsync(
    "sensitive-data.txt", 
    "my-secret-key"
);

Compression Example

// Store compressed content
await storageManager.PutCompressedAsync(
    "large-file.json", 
    contentStream, 
    compressionLevel: 6
);

// Retrieve and decompress
var decompressedStream = await storageManager.GetDecompressedAsync(
    "large-file.json"
);

Multiple Providers

// Register multiple providers
storageManager.RegisterDriver("local", new LocalStorageDriver(localOptions));
storageManager.RegisterDriver("s3", new S3StorageDriver(s3Options));
storageManager.RegisterDriver("azure", new AzureBlobStorageDriver(azureOptions));

// Switch between providers
await storageManager.SwitchDriverAsync("s3");
await storageManager.UploadAsync("file.txt", content); // Saves to S3

await storageManager.SwitchDriverAsync("azure");
await storageManager.UploadAsync("file.txt", content); // Saves to Azure

Health Checks

// Check storage health
var healthStatus = await storageManager.HealthCheckAsync();
foreach (var (driver, isHealthy) in healthStatus)
{
    Console.WriteLine($"{driver}: {(isHealthy ? "Healthy" : "Unhealthy")}");
}

// Get detailed statistics
var stats = await storageManager.GetStatisticsAsync();
Console.WriteLine($"Total files: {stats.TotalFiles}");
Console.WriteLine($"Total size: {stats.TotalSize} bytes");

๐Ÿ”ง Configuration

appsettings.json

{
  "StorageManager": {
    "DefaultDriver": "local",
    "EnableCaching": true,
    "CacheExpiration": "00:30:00",
    "Drivers": {
      "local": {
        "Type": "Local",
        "RootPath": "C:\\Storage",
        "IsReadOnly": false
      },
      "s3": {
        "Type": "S3",
        "AccessKey": "your-access-key",
        "SecretKey": "your-secret-key",
        "BucketName": "your-bucket",
        "Region": "us-west-2"
      },
      "azure": {
        "Type": "AzureBlob",
        "ConnectionString": "your-connection-string",
        "ContainerName": "your-container"
      }
    }
  }
}

Startup Configuration

// Configure from appsettings.json
builder.Services.Configure<StorageManagerConfiguration>(
    builder.Configuration.GetSection("StorageManager")
);

// Add StorageManager
builder.Services.AddStorageManagerComplete();

// Or minimal setup
builder.Services.AddStorageManagerMinimal();

๐ŸŽฏ Requirements

  • .NET 9.0 or later
  • Visual Studio 2022 / VS Code / JetBrains Rider
  • Docker (optional, for development environment)

๐Ÿ“ˆ Project Status

โœ… Production Ready - Complete implementation with full testing

  • โœ… All Core Features - Storage drivers, encryption, compression, caching
  • โœ… Complete Testing - 222 tests passing across all providers
  • โœ… All Storage Providers - Local, Cloud (AWS, Azure, Google), Database, Redis, SFTP, Memory
  • โœ… Security Validated - No known vulnerabilities, secure dependencies
  • โœ… Performance Optimized - Async operations, streaming, compression
  • โœ… Production Deployments - Docker support, health checks, monitoring
  • โœ… Comprehensive Documentation - API docs, examples, guides

๐Ÿ—๏ธ Project Structure

StorageManager/
โ”œโ”€โ”€ ๐Ÿ“š docs/                    # Complete documentation
โ”œโ”€โ”€ ๐Ÿ’ป src/                     # Source code
โ”‚   โ”œโ”€โ”€ StorageManager/         # ๐Ÿ“ฆ Complete package (this)
โ”‚   โ”œโ”€โ”€ StorageManager.Core/    # Core interfaces and models
โ”‚   โ”œโ”€โ”€ StorageManager.Services/# Implementation services
โ”‚   โ”œโ”€โ”€ StorageManager.Providers/ # Storage drivers
โ”‚   โ”œโ”€โ”€ StorageManager.Extensions/ # ASP.NET Core integration
โ”‚   โ”œโ”€โ”€ StorageManager.Configuration/ # Configuration models
โ”‚   โ””โ”€โ”€ StorageManager.Utilities/ # Helper utilities
โ”œโ”€โ”€ ๐Ÿ“ฑ examples/                # Usage examples
โ”œโ”€โ”€ ๐Ÿงช tests/                   # Unit and integration tests
โ”œโ”€โ”€ ๐Ÿš€ deployment/              # Docker configurations
โ””โ”€โ”€ ๐Ÿ› ๏ธ tools/                   # Development tools

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for:

  • Development Setup - Local environment configuration
  • Coding Standards - Code style and quality guidelines
  • Pull Request Process - How to submit changes
  • Issue Reporting - Bug reports and feature requests

๐Ÿ‘ฅ Contributors

We thank all contributors who have helped make StorageManager better:

๐Ÿ† Core Team

๐ŸŒŸ How to Contribute

We welcome contributions of all kinds! Here are some ways you can help:

  • ๐Ÿ› Report Bugs - Found an issue? Let us know!
  • ๐Ÿ’ก Suggest Features - Have an idea? Share it with us!
  • ๐Ÿ“– Improve Documentation - Help make our docs better
  • ๐Ÿงช Write Tests - Increase our test coverage
  • ๐Ÿ”ง Submit Code - Fix bugs or add new features

See our Contributing Guide for detailed instructions.

๐Ÿ“Š Performance

Benchmarks

Operation Local S3 Azure Memory
Upload (1MB) ~5ms ~150ms ~120ms ~1ms
Download (1MB) ~3ms ~100ms ~90ms ~0.5ms
List (1000 files) ~10ms ~200ms ~180ms ~2ms

Optimizations

  • Async Operations - Non-blocking I/O
  • Streaming - Memory-efficient for large files
  • Compression - Up to 70% size reduction
  • Caching - Configurable cache strategies
  • Connection Pooling - Efficient resource usage

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ’ก Need Help?

Built with โค๏ธ by Edgar Poghosyan and Hakob Vardanyan

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.8 121 9/11/2025

Complete documentation overhaul with comprehensive guides, API reference, and examples. Updated for .NET 9 with all storage providers, security features, and performance optimizations. Includes Getting Started guide, API documentation, configuration examples, and troubleshooting guides.