diff --git a/src/StevanFreeborn.Extensions.Configuration.Secure/Storage/JsonFileStorageProvider.cs b/src/StevanFreeborn.Extensions.Configuration.Secure/Storage/JsonFileStorageProvider.cs
index 4884c3a..5e336b0 100644
--- a/src/StevanFreeborn.Extensions.Configuration.Secure/Storage/JsonFileStorageProvider.cs
+++ b/src/StevanFreeborn.Extensions.Configuration.Secure/Storage/JsonFileStorageProvider.cs
@@ -5,23 +5,15 @@ using Microsoft.Extensions.Primitives;
namespace StevanFreeborn.Extensions.Configuration.Secure.Storage;
-///
-/// Provides a mechanism to store and retrieve secure configuration data in a JSON file.
-///
-public sealed class JsonFileStorageProvider : ISecureStorageProvider
+internal sealed class JsonFileStorageProvider : ISecureStorageProvider
{
private static readonly SemaphoreSlim FileLock = new(1, 1);
private readonly PhysicalFileProvider? _fileProvider;
private readonly IDisposable? _changeTokenRegistration;
private readonly JsonStorageOptions _options;
- ///
public event EventHandler? StorageChanged;
- ///
- /// Provides a mechanism to store and retrieve secure configuration data in a JSON file.
- ///
- /// The configuring the storage provider, including file paths.
public JsonFileStorageProvider(JsonStorageOptions options)
{
_options = options
@@ -48,12 +40,6 @@ public sealed class JsonFileStorageProvider : ISecureStorageProvider
}
}
- ///
- /// Reads the value associated with the specified key from the JSON file asynchronously.
- ///
- /// The key of the configuration value to read.
- /// A cancellation token that can be used to cancel the read operation.
- /// A task that represents the asynchronous read operation. The task result contains the value associated with the specified key, or an empty string if the key is not found.
public async Task ReadAsync(string key, CancellationToken ct = default)
{
var data = await AcquireLockAndLoadAsync(ct).ConfigureAwait(false);
@@ -66,23 +52,11 @@ public sealed class JsonFileStorageProvider : ISecureStorageProvider
return string.Empty;
}
- ///
- /// Reads all configuration values from the JSON file asynchronously.
- ///
- /// A cancellation token that can be used to cancel the read operation.
- /// A task that represents the asynchronous read operation. The task result contains a dictionary of all configuration keys and their values.
public Task> ReadAllAsync(CancellationToken ct = default)
{
return AcquireLockAndLoadAsync(ct);
}
- ///
- /// Writes the specified key and encrypted data to the JSON file asynchronously.
- ///
- /// The key of the configuration value to write.
- /// The encrypted configuration data to write.
- /// A cancellation token that can be used to cancel the write operation.
- /// A task that represents the asynchronous write operation.
public async Task WriteAsync(string key, string encryptedData, CancellationToken ct = default)
{
await FileLock.WaitAsync(ct).ConfigureAwait(false);
@@ -99,12 +73,6 @@ public sealed class JsonFileStorageProvider : ISecureStorageProvider
}
}
- ///
- /// Deletes the configuration value associated with the specified key from the JSON file asynchronously.
- ///
- /// The key of the configuration value to delete.
- /// A cancellation token that can be used to cancel the delete operation.
- /// A task that represents the asynchronous delete operation. The task result contains true if the value was successfully deleted; otherwise, false.
public async Task DeleteAsync(string key, CancellationToken ct = default)
{
await FileLock.WaitAsync(ct).ConfigureAwait(false);
@@ -122,9 +90,6 @@ public sealed class JsonFileStorageProvider : ISecureStorageProvider
}
}
- ///
- ///
- ///
public void Dispose()
{
_changeTokenRegistration?.Dispose();