add IsSupported
MODIFY
Directory.Build.props
Directory.Build.props
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LangVersion>latest</LangVersion>
<NoWarn>CS1591</NoWarn>
- <Version>1.1.0</Version>
+ <Version>1.2.0</Version>
<AssemblyVersion>1.0</AssemblyVersion>
<AssemblyInformationalVersion>$(Version)</AssemblyInformationalVersion>
<Authors>Simon Cropp</Authors>

MODIFY
README.md
README.md
@@ -58,7 +58,7 @@ If anyone verifies any of the above, please submit a [Pull Request](https://help
* Linux with .NET Core
* Xamarin.Android
-If other combinations are required please submit a [Pull Request](https://help.github.com/articles/about-pull-requests/) that adds support.
+If other combinations are required, please submit a [Pull Request](https://help.github.com/articles/about-pull-requests/) that adds support.
## Icon

MODIFY
TextCopy/Clipboard.cs
TextCopy/Clipboard.cs
@@ -8,6 +8,12 @@ namespace TextCopy
static Action<string> setAction = CreateSet();
static Func<string> getFunc = CreateGet();
+ static Clipboard()
+ {
+ IsGetSupported = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
+ IsSetSupported = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
+ }
+
public static void SetText(string text)
{
if (text == null)
@@ -48,5 +54,9 @@ namespace TextCopy
return () => throw new NotSupportedException();
}
+
+ public static readonly bool IsSetSupported;
+
+ public static readonly bool IsGetSupported;
}
}
\ No newline at end of file

add IsSupported