Cayaqui.MPS.Storage
0.2.0
dotnet add package Cayaqui.MPS.Storage --version 0.2.0
NuGet\Install-Package Cayaqui.MPS.Storage -Version 0.2.0
<PackageReference Include="Cayaqui.MPS.Storage" Version="0.2.0" />
<PackageVersion Include="Cayaqui.MPS.Storage" Version="0.2.0" />
<PackageReference Include="Cayaqui.MPS.Storage" />
paket add Cayaqui.MPS.Storage --version 0.2.0
#r "nuget: Cayaqui.MPS.Storage, 0.2.0"
#:package Cayaqui.MPS.Storage@0.2.0
#addin nuget:?package=Cayaqui.MPS.Storage&version=0.2.0
#tool nuget:?package=Cayaqui.MPS.Storage&version=0.2.0
Cayaqui.MPS.Storage
Servicio genérico de Storage para .NET 10 con proveedores intercambiables:
- Azure Blob Storage — connection string o Managed Identity
- Local File System — con sidecar JSON para metadata/content-type (útil para dev/tests)
Distribución propietaria — requiere contrato comercial con Cayaqui. Ver
LICENSE.txt.
Instalación
dotnet add package Cayaqui.MPS.Storage
Registro
// Azure Blob con connection string
builder.Services.AddMpsStorage(opt => opt.UseAzureBlob(Configuration["Storage:ConnString"]));
// Azure Blob con Managed Identity
builder.Services.AddMpsStorage(opt =>
opt.UseAzureBlob(new Uri("https://mystorage.blob.core.windows.net")));
// Local (dev/tests)
builder.Services.AddMpsStorage(opt => opt.UseFileSystem("/var/data/mps"));
Uso
public class InvoiceService(IStorageService storage)
{
public async Task AttachAsync(int invoiceId, Stream pdf)
{
var obj = await storage.UploadAsync(
container: "invoices",
key: $"{invoiceId}/invoice.pdf",
content: pdf,
contentType: "application/pdf");
}
public async Task<Stream> OpenAsync(int invoiceId)
{
var obj = await storage.DownloadAsync("invoices", $"{invoiceId}/invoice.pdf");
return obj.Content!;
}
public async Task<Uri> GetDownloadUrlAsync(int invoiceId)
=> await storage.GetUrlAsync("invoices", $"{invoiceId}/invoice.pdf", TimeSpan.FromMinutes(15));
}
API
| Método | Descripción |
|---|---|
UploadAsync(container, key, stream, contentType?, metadata?, ct) |
Sube un stream. Crea container si no existe. |
DownloadAsync(container, key, ct) |
Descarga el objeto (StorageObject.Content es un Stream). |
DeleteAsync(container, key, ct) |
true si existía y se eliminó. |
ExistsAsync(container, key, ct) |
Boolean rápido sin descargar contenido. |
ListAsync(container, prefix?, ct) |
IAsyncEnumerable<StorageObject>. |
GetUrlAsync(container, key, expiresIn, ct) |
SAS (Azure) o file:// (local). |
Requisitos
- .NET 10.0 o superior
- Cuenta Azure Storage (para el proveedor
AzureBlob)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Azure.Identity (>= 1.21.0)
- Azure.Storage.Blobs (>= 12.23.0)
- Cayaqui.MPS.Metadata (>= 0.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
- Microsoft.Extensions.Options (>= 10.0.7)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Cayaqui.MPS.Storage:
| Package | Downloads |
|---|---|
|
Cayaqui.MPS.ExcelExport
Exports strongly-typed collections of DTOs to .xlsx using the attributes from Cayaqui.MPS.Metadata: Label for headers, Currency/Percentage/Date for cell formats, Align/ColumnWidth for layout, VisibleIn/Hidden for visibility, Order for column order, Badge for cell background color. Uses Syncfusion XlsIO. Proprietary — requires a commercial agreement with Cayaqui. |
|
|
Cayaqui.MPS.Reports
Template-based report generation for .NET 10 using Syncfusion File Formats (OpenXML compliant). Supports Excel (XlsIO), Word (DocIO), PowerPoint (Presentation) templates with MailMerge / template markers / placeholder replacement, native chart generation, and PDF conversion. Templates are loaded from Cayaqui.MPS.Storage. Proprietary — requires a commercial agreement with Cayaqui. |
|
|
Cayaqui.MPS.ExcelImport
Reads .xlsx files and materializes strongly-typed DTOs using the attributes from Cayaqui.MPS.Metadata (ImportAlias, ImportColumn, ImportCulture, ImportDefault, ImportTrim, ImportRegex) plus resolver-based TryParse. Uses Syncfusion XlsIO for spreadsheet access. Proprietary — requires a commercial agreement with Cayaqui. |
|
|
Cayaqui.MPS.Email
Generic email service for .NET 10 with pluggable providers (Azure Communication Services, SMTP via MailKit), Scriban-based template rendering and CSS inlining for HTML emails. Proprietary — requires a commercial agreement with Cayaqui. |
|
|
Cayaqui.MPS.PptExport
Programmatic PowerPoint slide sections for EVM reporting. Each IPptSlideSection adds a slide to a Syncfusion.Presentation IPresentation. Pairs with Cayaqui.MPS.ExcelExport and Cayaqui.MPS.ReportModels. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release. IStorageService with Azure Blob and FileSystem providers.