chore: deprecate standalone SecureStoreManager utility
Move SecureStoreManager project and tests to Deprecated folder and remove from solution. SecureStore functionality is now integrated into ConfigManager.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using Avalonia.Input.Platform;
|
||||
|
||||
namespace JdeScoping.SecureStoreManager.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Avalonia implementation of IClipboardService.
|
||||
/// </summary>
|
||||
public class AvaloniaClipboardService : IClipboardService
|
||||
{
|
||||
private readonly Func<IClipboard?> _getClipboard;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of AvaloniaClipboardService.
|
||||
/// </summary>
|
||||
/// <param name="getClipboard">Factory function to get the clipboard instance.</param>
|
||||
public AvaloniaClipboardService(Func<IClipboard?> getClipboard)
|
||||
{
|
||||
_getClipboard = getClipboard ?? throw new ArgumentNullException(nameof(getClipboard));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the clipboard text asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="text">The text to set on the clipboard.</param>
|
||||
public async Task SetTextAsync(string text)
|
||||
{
|
||||
var clipboard = _getClipboard();
|
||||
if (clipboard != null)
|
||||
{
|
||||
await clipboard.SetTextAsync(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user