Rystem.Content.Infrastructure.M365.Sharepoint 9.0.20

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

// Install Rystem.Content.Infrastructure.M365.Sharepoint as a Cake Tool
#tool nuget:?package=Rystem.Content.Infrastructure.M365.Sharepoint&version=9.0.20                

What is Rystem?

Get information

https://<tenant>.sharepoint.com/sites/<site-url>/_api/site/id

Integration with Sharepoint online and Content Repository

await services
.AddContentRepository()
.WithSharepointIntegrationAsync(x =>
{
    x.TenantId = configuration["Sharepoint:TenantId"];
    x.ClientId = configuration["Sharepoint:ClientId"];
    x.ClientSecret = configuration["Sharepoint:ClientSecret"];
    x.MapWithSiteNameAndDocumentLibraryName("TestNumberOne", "Foglione");
    //x.MapWithRootSiteAndDocumentLibraryName("Foglione");
    //x.MapWithSiteIdAndDocumentLibraryId(configuration["Sharepoint:SiteId"],
    //    configuration["Sharepoint:DocumentLibraryId"]);
}, "sharepoint")
.NoContext();

How to use in a business class

public class AllStorageTest
{
    private readonly IContentRepositoryFactory _contentRepositoryFactory;
    private readonly Utility _utility;
    public AllStorageTest(IContentRepositoryFactory contentRepositoryFactory, Utility utility)
    {
        _contentRepositoryFactory = contentRepositoryFactory;
        _utility = utility;
    }
    
    public async Task ExecuteAsync()
    {
        var _contentRepository = _contentRepositoryFactory.Create("sharepoint");
        var file = await _utility.GetFileAsync();
        var name = "folder/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 _contentRepository.ExistAsync(name).NoContext();
        if (response)
        {
            await _contentRepository.DeleteAsync(name).NoContext();
            response = await _contentRepository.ExistAsync(name).NoContext();
        }
        Assert.False(response);
        response = await _contentRepository.UploadAsync(name, file.ToArray(), new ContentRepositoryOptions
        {
            HttpHeaders = new ContentRepositoryHttpHeaders
            {
                ContentType = contentType
            },
            Metadata = metadata,
            Tags = tags
        }, true).NoContext();
        Assert.True(response);
        response = await _contentRepository.ExistAsync(name).NoContext();
        Assert.True(response);
        var options = await _contentRepository.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 _contentRepository.SetPropertiesAsync(name, new ContentRepositoryOptions
        {
            HttpHeaders = new ContentRepositoryHttpHeaders
            {
                ContentType = contentType
            },
            Metadata = metadata,
            Tags = tags
        }).NoContext();
        Assert.True(response);
        options = await _contentRepository.GetPropertiesAsync(name, ContentInformationType.All).NoContext();
        Assert.Equal("single", options.Options.Metadata["ale2"]);
        response = await _contentRepository.DeleteAsync(name).NoContext();
        Assert.True(response);
        response = await _contentRepository.ExistAsync(name).NoContext();
        Assert.False(response);
    }
}
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. 
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.29 8,869 4 days ago
9.0.28 122 5 days ago
9.0.27 124 6 days ago
9.0.26 129 10 days ago
9.0.25 51,986 13 days ago
9.0.21 194 16 days ago
9.0.20 19,460 16 days ago
9.0.19 191 17 days ago
9.0.18 198 18 days ago
9.0.17 82 21 days ago
9.0.16 76 21 days ago
9.0.15 75,422 a month ago
9.0.14 22,469 a month ago
9.0.13 97 a month ago
9.0.12 217,578 2 months ago
9.0.11 23,931 2 months ago
9.0.10 67 2 months ago
9.0.9 3,940 2 months ago
9.0.8 12,441 3 months ago
9.0.7 84 3 months ago
9.0.4 92,212 3 months ago
9.0.3 90 3 months ago
9.0.2 10,628 3 months ago
9.0.1 1,135 3 months ago
9.0.0 172,920 4 months ago
9.0.0-rc.1 85 5 months ago
6.2.0 218,994 5 months ago
6.1.1 97 5 months ago
6.1.0 47,848 6 months ago
6.0.24 117 6 months ago
6.0.23 340,002 8 months ago
6.0.21 119 9 months ago
6.0.20 727,706 9 months ago
6.0.19 30,380 9 months ago
6.0.18 111 9 months ago
6.0.17 108 9 months ago
6.0.16 49,966 9 months ago
6.0.15 118 9 months ago
6.0.14 94,459 10 months ago
6.0.13 115 10 months ago
6.0.12 107 10 months ago
6.0.11 128 5/20/2024
6.0.9 137 5/20/2024
6.0.7 113 5/18/2024
6.0.6 111 5/10/2024
6.0.5 115 5/10/2024
6.0.4 550,002 4/3/2024
6.0.3 170 3/25/2024
6.0.2 182 3/11/2024
6.0.0 223 11/21/2023
6.0.0-rc.6 99 10/25/2023
6.0.0-rc.5 82 10/25/2023
6.0.0-rc.4 72 10/23/2023
6.0.0-rc.3 70 10/19/2023
6.0.0-rc.2 76 10/18/2023
6.0.0-rc.1 72 10/16/2023
5.0.20 163 9/25/2023
5.0.19 192 9/10/2023
5.0.18 174 9/6/2023
5.0.17 147 9/6/2023
5.0.16 169 9/5/2023
5.0.15 177 9/5/2023
5.0.14 175 9/5/2023
5.0.13 150 9/1/2023
5.0.12 177 8/31/2023
5.0.11 169 8/30/2023
5.0.10 178 8/29/2023
5.0.9 173 8/24/2023
5.0.8 178 8/24/2023
5.0.7 176 8/23/2023
5.0.6 166 8/21/2023
5.0.5 198 8/21/2023
5.0.4 174 8/16/2023
5.0.3 214 8/2/2023
5.0.2 200 8/2/2023
5.0.1 205 8/1/2023
5.0.0 215 7/31/2023
4.0.6 222 7/20/2023
4.0.4 251 7/10/2023
4.0.3 188 7/10/2023
4.0.0 197 7/9/2023