Rystem.Content.Abstractions
9.0.17
See the version list below for details.
dotnet add package Rystem.Content.Abstractions --version 9.0.17
NuGet\Install-Package Rystem.Content.Abstractions -Version 9.0.17
<PackageReference Include="Rystem.Content.Abstractions" Version="9.0.17" />
paket add Rystem.Content.Abstractions --version 9.0.17
#r "nuget: Rystem.Content.Abstractions, 9.0.17"
// Install Rystem.Content.Abstractions as a Cake Addin #addin nuget:?package=Rystem.Content.Abstractions&version=9.0.17 // Install Rystem.Content.Abstractions as a Cake Tool #tool nuget:?package=Rystem.Content.Abstractions&version=9.0.17
What is Rystem?
Content Repository Abstractions
You may use this library to help the integration with your business and your several storage repositories.
Dependency injection
services
.AddContentRepository()
.WithIntegration<SimpleIntegration>("example", ServiceLifetime.Singleton);
with integration class
internal sealed class SimpleIntegration : IContentRepository
{
public ValueTask<bool> DeleteAsync(string path, CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
}
public Task<ContentRepositoryDownloadResult?> DownloadAsync(string path, ContentInformationType informationRetrieve = ContentInformationType.None, CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
}
public ValueTask<bool> ExistAsync(string path, CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
}
public Task<ContentRepositoryResult?> GetPropertiesAsync(string path, ContentInformationType informationRetrieve = ContentInformationType.All, CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
}
public IAsyncEnumerable<ContentRepositoryDownloadResult> ListAsync(string? prefix = null, bool downloadContent = false, ContentInformationType informationRetrieve = ContentInformationType.None, CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
}
public void SetName(string name)
{
throw new NotImplementedException();
}
public ValueTask<bool> SetPropertiesAsync(string path, ContentRepositoryOptions? options = null, CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
}
public ValueTask<bool> UploadAsync(string path, byte[] data, ContentRepositoryOptions? options = null, bool overwrite = true, CancellationToken cancellationToken = default)
{
throw new NotImplementedException();
}
}
How to use
If you have only one integration installed at once, you may inject directly
public sealed class SimpleBusiness
{
private readonly IContentRepository _contentRepository;
public SimpleBusiness(IContentRepository contentRepository)
{
_contentRepository = contentRepository;
}
}
In case of multiple integrations you have to use the factory service
DI
services
.AddContentRepository()
.WithIntegration<SimpleIntegration>("example", ServiceLifetime.Singleton);
.WithIntegration<SimpleIntegration2>("example2", ServiceLifetime.Singleton);
in Business class to use the first integration
public sealed class SimpleBusiness
{
private readonly IContentRepository _contentRepository;
public SimpleBusiness(IContentRepositoryFactory contentRepositoryFactory)
{
_contentRepository = contentRepositoryFactory.Create("example");
}
}
in Business class to use the second integration
public sealed class SimpleBusiness
{
private readonly IContentRepository _contentRepository;
public SimpleBusiness(IContentRepositoryFactory contentRepositoryFactory)
{
_contentRepository = contentRepositoryFactory.Create("example2");
}
}
Migration tool
You can migrate from two different sources. For instance from a blob storage to a sharepoint site document library.
Setup in DI
services
.AddSingleton<Utility>()
.AddContentRepository()
.WithBlobStorageIntegrationAsync(x =>
{
x.ContainerName = "supertest";
x.Prefix = "site/";
x.ConnectionString = configuration["ConnectionString:Storage"];
},
"blobstorage")
.ToResult()
.WithInMemoryIntegration("inmemory")
.WithSharepointIntegrationAsync(x =>
{
x.TenantId = configuration["Sharepoint:TenantId"];
x.ClientId = configuration["Sharepoint:ClientId"];
x.ClientSecret = configuration["Sharepoint:ClientSecret"];
x.MapWithSiteNameAndDocumentLibraryName("TestNumberOne", "Foglione");
}, "sharepoint")
.ToResult();
Usage
var result = await _contentMigration.MigrateAsync("blobstorage", "sharepoint",
settings =>
{
settings.OverwriteIfExists = true;
settings.Prefix = prefix;
settings.Predicate = (x) =>
{
return x.Path?.Contains("fileName6") != true;
};
settings.ModifyDestinationPath = x =>
{
return x.Replace("Folder2", "Folder3");
};
}).NoContext();
Product | Versions 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. |
-
net9.0
- Rystem.DependencyInjection (>= 9.0.17)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Rystem.Content.Abstractions:
Package | Downloads |
---|---|
Rystem.Content.Infrastructure.Storage.Blob
Rystem.Content helps you to integrate with azure services or to create an abstraction layer among your infrastructure and your business. |
|
Rystem.Content.Infrastructure.M365.Sharepoint
Rystem.Content helps you to integrate with azure services or to create an abstraction layer among your infrastructure and your business. |
|
Rystem.Content.Infrastructure.InMemory
Rystem.Content helps you to integrate with azure services or to create an abstraction layer among your infrastructure and your business. |
|
Rystem.Content.Infrastructure.Storage.File
Rystem.Content helps you to integrate with azure services or to create an abstraction layer among your infrastructure and your business. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
9.0.29 | 8,898 | 4 days ago |
9.0.28 | 147 | 5 days ago |
9.0.27 | 144 | 5 days ago |
9.0.26 | 154 | 9 days ago |
9.0.25 | 52,030 | 13 days ago |
9.0.23 | 108 | 13 days ago |
9.0.21 | 227 | 16 days ago |
9.0.20 | 19,486 | 16 days ago |
9.0.19 | 214 | 16 days ago |
9.0.18 | 226 | 18 days ago |
9.0.17 | 133 | 21 days ago |
9.0.16 | 105 | 21 days ago |
9.0.15 | 75,430 | a month ago |
9.0.14 | 22,495 | a month ago |
9.0.13 | 129 | a month ago |
9.0.12 | 217,656 | 2 months ago |
9.0.11 | 23,951 | 2 months ago |
9.0.10 | 77 | 2 months ago |
9.0.9 | 3,965 | 2 months ago |
9.0.8 | 12,482 | 3 months ago |
9.0.7 | 107 | 3 months ago |
9.0.5 | 19,051 | 3 months ago |
9.0.4 | 92,262 | 3 months ago |
9.0.3 | 118 | 3 months ago |
9.0.2 | 10,653 | 3 months ago |
9.0.1 | 1,159 | 3 months ago |
9.0.0 | 173,046 | 4 months ago |
9.0.0-rc.1 | 133 | 5 months ago |
6.2.0 | 219,099 | 5 months ago |
6.1.1 | 136 | 5 months ago |
6.1.0 | 47,956 | 6 months ago |
6.0.24 | 190 | 6 months ago |
6.0.23 | 340,086 | 8 months ago |
6.0.21 | 164 | 9 months ago |
6.0.20 | 727,370 | 9 months ago |
6.0.19 | 30,815 | 9 months ago |
6.0.18 | 160 | 9 months ago |
6.0.17 | 153 | 9 months ago |
6.0.16 | 50,029 | 9 months ago |
6.0.15 | 155 | 9 months ago |
6.0.14 | 94,521 | 10 months ago |
6.0.13 | 173 | 10 months ago |
6.0.12 | 162 | 10 months ago |
6.0.11 | 174 | 5/20/2024 |
6.0.9 | 180 | 5/19/2024 |
6.0.7 | 164 | 5/18/2024 |
6.0.6 | 169 | 5/10/2024 |
6.0.5 | 172 | 5/10/2024 |
6.0.4 | 550,010 | 4/3/2024 |
6.0.3 | 186 | 3/25/2024 |
6.0.2 | 264 | 3/11/2024 |
6.0.1 | 132 | 3/8/2024 |
6.0.0 | 334 | 11/21/2023 |
6.0.0-rc.6 | 111 | 10/25/2023 |
6.0.0-rc.5 | 93 | 10/25/2023 |
6.0.0-rc.4 | 84 | 10/23/2023 |
6.0.0-rc.3 | 78 | 10/19/2023 |
6.0.0-rc.2 | 98 | 10/18/2023 |
6.0.0-rc.1 | 94 | 10/16/2023 |
5.0.20 | 427 | 9/25/2023 |
5.0.19 | 805 | 9/10/2023 |
5.0.18 | 258 | 9/6/2023 |
5.0.17 | 228 | 9/6/2023 |
5.0.16 | 231 | 9/5/2023 |
5.0.15 | 243 | 9/5/2023 |
5.0.14 | 224 | 9/5/2023 |
5.0.13 | 338 | 9/1/2023 |
5.0.12 | 207 | 8/31/2023 |
5.0.11 | 217 | 8/30/2023 |
5.0.10 | 223 | 8/29/2023 |
5.0.9 | 233 | 8/24/2023 |
5.0.8 | 220 | 8/24/2023 |
5.0.7 | 238 | 8/23/2023 |
5.0.6 | 242 | 8/21/2023 |
5.0.5 | 248 | 8/21/2023 |
5.0.4 | 244 | 8/16/2023 |
5.0.3 | 422 | 8/2/2023 |
5.0.2 | 243 | 8/2/2023 |
5.0.1 | 229 | 8/1/2023 |
5.0.0 | 238 | 7/31/2023 |
4.0.6 | 253 | 7/20/2023 |
4.0.4 | 289 | 7/10/2023 |
4.0.3 | 211 | 7/10/2023 |
4.0.2 | 154 | 7/7/2023 |
4.0.1 | 205 | 7/7/2023 |