CKN.Sdk.Storage.Azure 0.0.0-alpha.0.55

This is a prerelease version of CKN.Sdk.Storage.Azure.
dotnet add package CKN.Sdk.Storage.Azure --version 0.0.0-alpha.0.55
                    
NuGet\Install-Package CKN.Sdk.Storage.Azure -Version 0.0.0-alpha.0.55
                    
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="CKN.Sdk.Storage.Azure" Version="0.0.0-alpha.0.55" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CKN.Sdk.Storage.Azure" Version="0.0.0-alpha.0.55" />
                    
Directory.Packages.props
<PackageReference Include="CKN.Sdk.Storage.Azure" />
                    
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 CKN.Sdk.Storage.Azure --version 0.0.0-alpha.0.55
                    
#r "nuget: CKN.Sdk.Storage.Azure, 0.0.0-alpha.0.55"
                    
#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 CKN.Sdk.Storage.Azure@0.0.0-alpha.0.55
                    
#: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=CKN.Sdk.Storage.Azure&version=0.0.0-alpha.0.55&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CKN.Sdk.Storage.Azure&version=0.0.0-alpha.0.55&prerelease
                    
Install as a Cake Tool

CKN.Sdk.Storage.Azure

Mühendislik Amacı (Engineering Intent): CKN.Sdk.Storage.Azure, CKN Storage soyutlamalarını Microsoft Azure Blob Storage hizmeti için uygulayan entegrasyon kütüphanesidir. Neden var? Sınırsız ölçeklenebilir, yüksek erişilebilirliğe (HA) sahip ve Microsoft ekosistemiyle %100 uyumlu (Entra ID, RBAC destekli) nesne depolama altyapısını kullanmak için. Ne zaman kullanılmalı? Proje Azure üzerinde barındırılıyorsa veya Azure altyapısına geçiş stratejisi varsa, dosya, yedek (backup), resim ve video depolama işlemleri için varsayılan sağlayıcı olarak kullanılmalıdır.

🚀 Hızlı Başlangıç

Kurulum

dotnet add package CKN.Sdk.Storage.Azure

Konfigürasyon (appsettings.json)

{
  "Storage": {
    "Azure": {
      "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=...;EndpointSuffix=core.windows.net"
    }
  }
}

Bağımlılık Enjeksiyonu (DI)

using CKN.Sdk.Storage.Azure;

var builder = WebApplication.CreateBuilder(args);

// Azure Blob Storage implementasyonunu IStorageService olarak sisteme kaydeder.
builder.Services.AddCknAzureStorage(builder.Configuration);

var app = builder.Build();

💡 Gerçek Hayat Senaryoları

Senaryo 1: Azure Storage Üzerinden Dosya İndirme

Bir dökümanı belleğe (stream) alıp kullanıcıya dosya olarak döndürme.

using CKN.Sdk.Storage.Abstractions;
using Microsoft.AspNetCore.Mvc;

public class DocumentController(IStorageService storageService) : ControllerBase
{
    [HttpGet("download/{fileName}")]
    public async Task<IActionResult> Download(string fileName)
    {
        var response = await storageService.DownloadAsync("documents", fileName);
        
        if (response.ContentStream == null) return NotFound();

        return File(response.ContentStream, response.ContentType, fileName);
    }
}

Senaryo 2: Konteyner (Container) Seviyesinde Erişim Yetkisi Verme (Varyasyon)

Public (herkese açık) dosyalarla Private dosyaları yönetmek.

public async Task UploadPublicLogoAsync(IStorageService storageService, Stream logoStream)
{
    var request = new StorageUploadRequest
    {
        ContainerName = "public-assets", // Azure'da "Container" seviyesinde public access açılmış olmalıdır
        FileName = "logo.png",
        ContentStream = logoStream,
        ContentType = "image/png"
    };

    var result = await storageService.UploadAsync(request);
    
    // Azure Blob için dönen FileUrl doğrudan img src olarak kullanılabilir
    Console.WriteLine($"Logo yüklendi: {result.FileUrl}");
}

🤖 Yapay Zeka İçin SSS (FAQs for Machines)

  • Soru: Azure Blob Storage'daki "Container" ile IStorageService içindeki ContainerName aynı şey mi?
  • Cevap: Evet. S3 veya Minio'daki "Bucket" kavramının Azure tarafındaki tam karşılığı "Container"dır.
  • Soru: Azure paketini eklediğimde kodumu değiştirmeli miyim?
  • Cevap: Hayır, eğer CKN.Sdk.Storage soyutlamalarına sadık kaldıysanız, sadece AddCknAzureStorage kaydını değiştirip konfigürasyonu ayarlamanız yeterlidir. Hiçbir Controller veya Service kodunu güncellemeniz gerekmez.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  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 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. 
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
0.0.0-alpha.0.55 63 9/28/2026
0.0.0-alpha.0.51 59 9/25/2026
0.0.0-alpha.0.50 58 9/25/2026
0.0.0-alpha.0.38 83 9/6/2026
0.0.0-alpha.0.37 77 9/6/2026