Skip to content

Commit

Permalink
Marked StringCatalog as Windows-only
Browse files Browse the repository at this point in the history
Also marked its test class with the same. Also marked another test class Windows-only, though it doesn't have to be Windows-only (just how it was written). This attribute is only supported with .NET5 and later, so on Framework there will be no marking.

These changes fix a large number of build warnings.
  • Loading branch information
josephmyers committed Nov 12, 2024
1 parent e77f07f commit 1c96f75
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions SIL.Core.Desktop.Tests/i18n/StringCatalogTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ namespace SIL.Tests.i18n
{

[TestFixture]
#if NET
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
[Platform("windows")]
public class StringCatalogTests
{
private string _poFile = Path.GetTempFileName();
Expand Down
3 changes: 3 additions & 0 deletions SIL.Core.Desktop/i18n/StringCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

namespace SIL.i18n
{
#if NET
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
public class StringCatalog
{
private Dictionary<string, string> _catalog;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
namespace SIL.DictionaryServices.Tests
{
[TestFixture]
[Platform(Include = "Windows")]
[OfflineSldr]
#if NET
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
public class LiftLexEntryRepositoryCachingTests
{
private TemporaryFolder _tempfolder;
Expand Down Expand Up @@ -371,4 +375,4 @@ public void GetAllEntriesSortedByDefinition_DeleteAllItemsAfterFirstCall_EntryIs


}
}
}

0 comments on commit 1c96f75

Please sign in to comment.