simplify for desktop
MODIFY
src/TextCopy/netdesktop/Clipboard.cs
src/TextCopy/netdesktop/Clipboard.cs
@@ -4,9 +4,6 @@ namespace TextCopy
{
public static class Clipboard
{
- static Action<string> setAction = CreateSet();
- static Func<string> getFunc = CreateGet();
-
public static void SetText(string text)
{
if (text == null)
@@ -14,22 +11,12 @@ namespace TextCopy
throw new ArgumentNullException(nameof(text));
}
- setAction(text);
+ WindowsClipboard.SetText(text);
}
public static string GetText()
{
- return getFunc();
- }
-
- static Action<string> CreateSet()
- {
- return WindowsClipboard.SetText;
- }
-
- static Func<string> CreateGet()
- {
- return WindowsClipboard.GetText;
+ return WindowsClipboard.GetText();
}
}
}
\ No newline at end of file

simplify for desktop