Rystem.Content.Infrastructure.InMemory 4.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rystem.Content.Infrastructure.InMemory --version 4.0.1                
NuGet\Install-Package Rystem.Content.Infrastructure.InMemory -Version 4.0.1                
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="Rystem.Content.Infrastructure.InMemory" Version="4.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rystem.Content.Infrastructure.InMemory --version 4.0.1                
#r "nuget: Rystem.Content.Infrastructure.InMemory, 4.0.1"                
#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.
// Install Rystem.Content.Infrastructure.InMemory as a Cake Addin
#addin nuget:?package=Rystem.Content.Infrastructure.InMemory&version=4.0.1

// Install Rystem.Content.Infrastructure.InMemory as a Cake Tool
#tool nuget:?package=Rystem.Content.Infrastructure.InMemory&version=4.0.1                

What is Rystem?

Integration with Azure BlobStorage and Content Repository

services
.AddContentRepository()
.WithBlobStorageIntegration(x =>
{
    x.ContainerName = "supertest";
    x.Prefix = "site/";
    x.ConnectionString = configuration["ConnectionString:Storage"];
},
"blobstorage");

How to use in a business class

public class BlobStorageTest
{
    private readonly IContentRepository _fileRepository;
    private readonly IContentRepositoryFactory _fileRepositoryFactory;
    private readonly Utility _utility;
    private readonly IContentRepository _blobRepository;
    public BlobStorageTest(IContentRepository fileRepository, IContentRepositoryFactory fileRepositoryFactory, Utility utility)
    {
        _fileRepository = fileRepository;
        _fileRepositoryFactory = fileRepositoryFactory;
        _utility = utility;
        _blobRepository = fileRepositoryFactory.Create("blobstorage");
    }
    [Fact]
    public async Task ExecuteAsync()
    {
        var file = await _utility.GetFileAsync();
        var name = "file.png";
        var contentType = "images/png";
        var metadata = new Dictionary<string, string>()
        {
            { "name", "ale" }
        };
        var tags = new Dictionary<string, string>()
        {
            { "version", "1" }
        };
        var response = await _blobRepository.ExistAsync(name).NoContext();
        if (response)
        {
            await _blobRepository.DeleteAsync(name).NoContext();
            response = await _blobRepository.ExistAsync(name).NoContext();
        }
        Assert.False(response);
        response = await _blobRepository.UploadAsync(name, file.ToArray(), new ContentRepositoryOptions
        {
            HttpHeaders = new ContentRepositoryHttpHeaders
            {
                ContentType = contentType
            },
            Metadata = metadata,
            Tags = tags
        }, true).NoContext();
        Assert.True(response);
        response = await _blobRepository.ExistAsync(name).NoContext();
        Assert.True(response);
        var options = await _blobRepository.GetPropertiesAsync(name, ContentInformationType.All).NoContext();
        Assert.NotNull(options.Uri);
        foreach (var x in metadata)
        {
            Assert.Equal(x.Value, options.Options.Metadata[x.Key]);
        }
        foreach (var x in tags)
        {
            Assert.Equal(x.Value, options.Options.Tags[x.Key]);
        }
        Assert.Equal(contentType, options.Options.HttpHeaders.ContentType);
        metadata.Add("ale2", "single");
        response = await _blobRepository.SetPropertiesAsync(name, new ContentRepositoryOptions
        {
            HttpHeaders = new ContentRepositoryHttpHeaders
            {
                ContentType = contentType
            },
            Metadata = metadata,
            Tags = tags
        }).NoContext();
        Assert.True(response);
        options = await _blobRepository.GetPropertiesAsync(name, ContentInformationType.All).NoContext();
        Assert.Equal("single", options.Options.Metadata["ale2"]);
        response = await _blobRepository.DeleteAsync(name).NoContext();
        Assert.True(response);
        response = await _blobRepository.ExistAsync(name).NoContext();
        Assert.False(response);
    }
}
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
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
9.0.0 28,586 11/16/2024
9.0.0-rc.1 74 10/18/2024
6.2.0 218,980 10/9/2024
6.1.1 95 10/9/2024
6.1.0 47,876 9/29/2024
6.0.24 127 9/11/2024
6.0.23 340,017 7/18/2024
6.0.21 104 6/18/2024
6.0.20 727,480 6/16/2024
6.0.19 30,357 6/14/2024
6.0.18 96 6/14/2024
6.0.17 104 6/14/2024
6.0.16 49,947 6/10/2024
6.0.15 102 6/9/2024
6.0.14 94,260 5/24/2024
6.0.13 129 5/23/2024
6.0.12 104 5/23/2024
6.0.11 116 5/20/2024
6.0.9 127 5/20/2024
6.0.7 114 5/18/2024
6.0.6 105 5/10/2024
6.0.5 110 5/10/2024
6.0.4 549,690 4/3/2024
6.0.3 108 3/25/2024
6.0.2 118 3/11/2024
6.0.0 262 11/21/2023
6.0.0-rc.6 101 10/25/2023
6.0.0-rc.5 78 10/25/2023
6.0.0-rc.4 70 10/23/2023
6.0.0-rc.3 65 10/19/2023
6.0.0-rc.2 76 10/18/2023
6.0.0-rc.1 70 10/16/2023
5.0.20 162 9/25/2023
5.0.19 207 9/10/2023
5.0.18 146 9/6/2023
5.0.17 147 9/6/2023
5.0.16 134 9/5/2023
5.0.15 138 9/5/2023
5.0.14 123 9/5/2023
5.0.13 130 9/1/2023
5.0.12 137 8/31/2023
5.0.11 119 8/30/2023
5.0.10 144 8/29/2023
5.0.9 152 8/24/2023
5.0.8 147 8/24/2023
5.0.7 158 8/23/2023
5.0.6 130 8/21/2023
5.0.5 133 8/21/2023
5.0.4 164 8/16/2023
5.0.3 192 8/2/2023
5.0.2 166 8/2/2023
5.0.1 150 8/1/2023
5.0.0 146 7/31/2023
4.0.6 177 7/20/2023
4.0.4 169 7/10/2023
4.0.3 158 7/10/2023
4.0.1 158 7/8/2023