Dosaic.Plugins.Persistence.Smb
1.1.11
dotnet add package Dosaic.Plugins.Persistence.Smb --version 1.1.11
NuGet\Install-Package Dosaic.Plugins.Persistence.Smb -Version 1.1.11
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="Dosaic.Plugins.Persistence.Smb" Version="1.1.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dosaic.Plugins.Persistence.Smb" Version="1.1.11" />
<PackageReference Include="Dosaic.Plugins.Persistence.Smb" />
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 Dosaic.Plugins.Persistence.Smb --version 1.1.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Dosaic.Plugins.Persistence.Smb, 1.1.11"
#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 Dosaic.Plugins.Persistence.Smb@1.1.11
#: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=Dosaic.Plugins.Persistence.Smb&version=1.1.11
#tool nuget:?package=Dosaic.Plugins.Persistence.Smb&version=1.1.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Dosaic.Plugins.Persistence.Smb
Dosaic.Plugins.Persistence.Smb is a plugin
that allows other dosaic components
to do interact witha Smb compatible storage
.
Installation
To install the nuget package follow these steps:
dotnet add package Dosaic.Plugins.Persistence.Smb
or add as package reference to your .csproj
<PackageReference Include="Dosaic.Plugins.Persistence.Smb" Version="" />
Appsettings.yml
Configure your appsettings.yml with these properties
smb:
server: example.com
domain: mydomain.com
defaultShare: myshare
driveMappings:
- drive: 'J:'
share: myshare
shareMappings:
- folder: myfolder
share: myshare
Usage
public class ExampleService
{
private readonly ISmbStorage _smbStorage;
// retrieve the registered service ISmbStorage from the DI container via depentency injection
public ExampleService(ISmbStorage smbStorage)
{
_smbStorage = smbStorage;
}
// ensure a file exist in the smb storage
public async Task EnsurePathAsync()
{
await _fileStorage.EnsurePathAsync("folder/subfolder/", cancellationToken);
}
// delete a file from the smb storage
public async Task DeleteIfExists()
{
await _fileStorage.DeleteIfExists("folder/myfile.txt", cancellationToken);
}
// write a byte array as file content to the smb storage
public async Task WriteAsync()
{
await _fileStorage.WriteAsync("folder/myfile.txt", new byte[0], cancellationToken);
}
// write a string as file content to the smb storage
public async Task WriteStringAsync()
{
await _fileStorage.WriteStringAsync("folder/myfile.txt", "hello world", cancellationToken);
}
// write a stream as file content to the smb storage
public async Task WriteStreamAsync()
{
await _fileStorage.WriteStringAsync("folder/myfile.txt", new MemoryStream(), cancellationToken);
}
// read a file form smb storage and return content as string
public async Task ReadStringAsync()
{
string content = await ReadStreamAsync("folder/myfile.txt", cancellationToken);
}
// read a file form smb storage and return content as byte array
public async Task ReadBytesAsync()
{
bytes[] stream = await ReadStreamAsync("folder/myfile.txt", cancellationToken);
}
}
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. net10.0 was computed. 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.
-
net9.0
- Dosaic.Hosting.Abstractions (>= 1.1.11)
- EzSmb (>= 1.3.10)
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 |
---|---|---|
1.1.11 | 96 | 7/18/2025 |
1.1.10 | 89 | 7/18/2025 |
1.1.9 | 146 | 7/8/2025 |
1.1.8 | 143 | 7/7/2025 |
1.1.7 | 224 | 6/13/2025 |
1.1.6 | 144 | 6/5/2025 |
1.1.5 | 143 | 6/4/2025 |
1.1.4 | 149 | 6/4/2025 |
1.1.3 | 138 | 5/23/2025 |
1.1.2 | 151 | 5/8/2025 |
1.1.1 | 150 | 5/6/2025 |
1.1.0 | 110 | 5/2/2025 |
1.0.37 | 162 | 4/7/2025 |
1.0.36 | 483 | 3/25/2025 |
1.0.35 | 231 | 3/4/2025 |
1.0.34 | 215 | 3/4/2025 |
1.0.32 | 156 | 3/3/2025 |
1.0.30 | 120 | 1/30/2025 |
1.0.27 | 112 | 1/29/2025 |
1.0.26 | 108 | 1/29/2025 |
1.0.25 | 106 | 1/29/2025 |
1.0.18 | 111 | 1/23/2025 |
1.0.17 | 106 | 1/23/2025 |