Skip to content

Commit 19e59c2

Browse files
authored
Make the configuration public (#1856)
Also move it to an internals namespace for other "configuration" points.
1 parent b5e04c5 commit 19e59c2

File tree

8 files changed

+14
-16
lines changed

8 files changed

+14
-16
lines changed

binding/Binding.Shared/LibraryLoader.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
using System.IO;
33
using System.Runtime.InteropServices;
44

5+
#if HARFBUZZ
6+
using HarfBuzzSharp.Internals;
7+
#else
8+
using SkiaSharp.Internals;
9+
#endif
10+
511
#if HARFBUZZ
612
namespace HarfBuzzSharp
713
#else

binding/Binding.Shared/PlatformConfiguration.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
#endif
88

99
#if HARFBUZZ
10-
namespace HarfBuzzSharp
10+
namespace HarfBuzzSharp.Internals
1111
#else
12-
namespace SkiaSharp
12+
namespace SkiaSharp.Internals
1313
#endif
1414
{
15-
internal static class PlatformConfiguration
15+
public static class PlatformConfiguration
1616
{
1717
private const string LibCLibrary = "libc";
1818

binding/Binding/GRGlInterface.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.ComponentModel;
33
using System.Runtime.InteropServices;
4+
using SkiaSharp.Internals;
45

56
#if __TIZEN__
67
using System.Reflection;

binding/Binding/SKAutoCoInitialize.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Runtime.InteropServices;
3+
using SkiaSharp.Internals;
34

45
namespace SkiaSharp
56
{

binding/Binding/SKData.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.IO;
33
using System.Runtime.InteropServices;
44
using System.Text;
5+
using SkiaSharp.Internals;
56

67
namespace SkiaSharp
78
{

binding/Binding/SKPixelSerializer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.ComponentModel;
3+
using SkiaSharp.Internals;
34

45
namespace SkiaSharp
56
{

tests/Tests/ApiTests.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -260,18 +260,5 @@ public void TestVersionsString()
260260
{
261261
Assert.Equal(SkiaSharpVersion.Native.ToString(2), SkiaSharpVersion.NativeString);
262262
}
263-
264-
[Trait(CategoryKey, ApiCategory)]
265-
[SkippableFact]
266-
public void PlatformConfigurationIsMuslOverrideCanBeFoundViaReflection()
267-
{
268-
var assembly = typeof(SkiaSharpVersion).Assembly;
269-
var config = assembly.DefinedTypes.FirstOrDefault(t => t.Name == "PlatformConfiguration");
270-
var overrideProp = config.GetProperty("LinuxFlavor");
271-
272-
Assert.Equal(typeof(string), overrideProp.PropertyType);
273-
Assert.True(overrideProp.CanRead);
274-
Assert.True(overrideProp.CanWrite);
275-
}
276263
}
277264
}

tests/Tests/BaseTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.IO;
3+
using SkiaSharp.Internals;
34

45
namespace SkiaSharp.Tests
56
{

0 commit comments

Comments
 (0)