From e0249b61b8caf64bb8b8b9d0a38304144520e167 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 23 Nov 2024 20:15:02 +0100 Subject: [PATCH] add singleton object for constants in c# --- .../libraries/csharp/ServicePoint/Constants.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 crates/servicepoint_binding_uniffi/libraries/csharp/ServicePoint/Constants.cs diff --git a/crates/servicepoint_binding_uniffi/libraries/csharp/ServicePoint/Constants.cs b/crates/servicepoint_binding_uniffi/libraries/csharp/ServicePoint/Constants.cs new file mode 100644 index 0000000..58cf560 --- /dev/null +++ b/crates/servicepoint_binding_uniffi/libraries/csharp/ServicePoint/Constants.cs @@ -0,0 +1,14 @@ + +using ServicePoint; + +public static class ServicePointConstants +{ + private static readonly Constants _instance = ServicepointBindingUniffiMethods.GetConstants(); + + public static readonly ulong PixelWidth = _instance.pixelWidth; + public static readonly ulong PixelHeight = _instance.pixelHeight; + public static readonly ulong PixelCount = _instance.pixelCount; + public static readonly ulong TileWidth = _instance.tileWidth; + public static readonly ulong TileHeight = _instance.tileHeight; + public static readonly ulong TileSize = _instance.tileSize; +}