From 74ddc12f9da0c77e7e7aea737eeb13ee017cb031 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Wed, 30 Nov 2022 19:09:01 +0000 Subject: [PATCH] Rename Native - > NativeMethods --- VpSharp/src/Entities/VirtualParadiseAvatar.cs | 2 +- VpSharp/src/Entities/VirtualParadiseModelObject.cs | 2 +- VpSharp/src/Entities/VirtualParadiseModelObjectBuilder.cs | 2 +- VpSharp/src/Entities/VirtualParadiseObject.cs | 2 +- VpSharp/src/Entities/VirtualParadiseUser.cs | 2 +- VpSharp/src/Internal/Connection.cs | 2 +- VpSharp/src/Internal/{Native.cs => NativeMethods.cs} | 2 +- VpSharp/src/InviteRequest.cs | 4 ++-- VpSharp/src/JoinRequest.cs | 4 ++-- VpSharp/src/VirtualParadiseClient.Avatars.cs | 2 +- VpSharp/src/VirtualParadiseClient.Native.cs | 4 ++-- VpSharp/src/VirtualParadiseClient.NativeCallbacks.cs | 2 +- VpSharp/src/VirtualParadiseClient.NativeEvents.cs | 2 +- VpSharp/src/VirtualParadiseClient.Objects.cs | 2 +- VpSharp/src/VirtualParadiseClient.Users.cs | 2 +- VpSharp/src/VirtualParadiseClient.Worlds.cs | 2 +- VpSharp/src/VirtualParadiseClient.cs | 2 +- VpSharp/src/WorldSettingsBuilder.cs | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) rename VpSharp/src/Internal/{Native.cs => NativeMethods.cs} (99%) diff --git a/VpSharp/src/Entities/VirtualParadiseAvatar.cs b/VpSharp/src/Entities/VirtualParadiseAvatar.cs index 8e49b94..789f879 100644 --- a/VpSharp/src/Entities/VirtualParadiseAvatar.cs +++ b/VpSharp/src/Entities/VirtualParadiseAvatar.cs @@ -3,7 +3,7 @@ using System.Numerics; using VpSharp.Extensions; using VpSharp.Internal; using VpSharp.Internal.NativeAttributes; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp.Entities; diff --git a/VpSharp/src/Entities/VirtualParadiseModelObject.cs b/VpSharp/src/Entities/VirtualParadiseModelObject.cs index 26e0fb4..ac352eb 100644 --- a/VpSharp/src/Entities/VirtualParadiseModelObject.cs +++ b/VpSharp/src/Entities/VirtualParadiseModelObject.cs @@ -1,6 +1,6 @@ using VpSharp.Internal; using VpSharp.Internal.NativeAttributes; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp.Entities; diff --git a/VpSharp/src/Entities/VirtualParadiseModelObjectBuilder.cs b/VpSharp/src/Entities/VirtualParadiseModelObjectBuilder.cs index d7f1aa0..135ebe8 100644 --- a/VpSharp/src/Entities/VirtualParadiseModelObjectBuilder.cs +++ b/VpSharp/src/Entities/VirtualParadiseModelObjectBuilder.cs @@ -2,7 +2,7 @@ using VpSharp.Extensions; using VpSharp.Internal; using VpSharp.Internal.NativeAttributes; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp.Entities; diff --git a/VpSharp/src/Entities/VirtualParadiseObject.cs b/VpSharp/src/Entities/VirtualParadiseObject.cs index 37b49f4..89b8ec1 100644 --- a/VpSharp/src/Entities/VirtualParadiseObject.cs +++ b/VpSharp/src/Entities/VirtualParadiseObject.cs @@ -3,7 +3,7 @@ using VpSharp.Exceptions; using VpSharp.Extensions; using VpSharp.Internal; using VpSharp.Internal.NativeAttributes; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp.Entities; diff --git a/VpSharp/src/Entities/VirtualParadiseUser.cs b/VpSharp/src/Entities/VirtualParadiseUser.cs index 4d6422e..500e767 100644 --- a/VpSharp/src/Entities/VirtualParadiseUser.cs +++ b/VpSharp/src/Entities/VirtualParadiseUser.cs @@ -3,7 +3,7 @@ using VpSharp.Exceptions; using VpSharp.Extensions; using VpSharp.Internal; using VpSharp.Internal.NativeAttributes; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp.Entities; diff --git a/VpSharp/src/Internal/Connection.cs b/VpSharp/src/Internal/Connection.cs index afb8199..237ac58 100644 --- a/VpSharp/src/Internal/Connection.cs +++ b/VpSharp/src/Internal/Connection.cs @@ -113,7 +113,7 @@ internal sealed class Connection : IDisposable { if (_vpConnection != 0) { - _ = Native.vp_net_notify(_vpConnection, (int)notification, rc); + _ = NativeMethods.vp_net_notify(_vpConnection, (int)notification, rc); } } } diff --git a/VpSharp/src/Internal/Native.cs b/VpSharp/src/Internal/NativeMethods.cs similarity index 99% rename from VpSharp/src/Internal/Native.cs rename to VpSharp/src/Internal/NativeMethods.cs index f4238a0..7cedeb7 100644 --- a/VpSharp/src/Internal/Native.cs +++ b/VpSharp/src/Internal/NativeMethods.cs @@ -5,7 +5,7 @@ using VpSharp.Internal.NativeAttributes; namespace VpSharp.Internal; -internal static class Native +internal static class NativeMethods { private const int NativeSdkVersion = 5; private const string VpSdkLibrary = "vpsdk"; diff --git a/VpSharp/src/InviteRequest.cs b/VpSharp/src/InviteRequest.cs index da4d384..7fceff6 100644 --- a/VpSharp/src/InviteRequest.cs +++ b/VpSharp/src/InviteRequest.cs @@ -81,7 +81,7 @@ public sealed class InviteRequest : IEquatable lock (_client.Lock) { - _ = Native.vp_invite_accept(_client.NativeInstanceHandle, _requestId); + _ = NativeMethods.vp_invite_accept(_client.NativeInstanceHandle, _requestId); } if (suppressTeleport) @@ -99,7 +99,7 @@ public sealed class InviteRequest : IEquatable { lock (_client.Lock) { - _ = Native.vp_invite_decline(_client.NativeInstanceHandle, _requestId); + _ = NativeMethods.vp_invite_decline(_client.NativeInstanceHandle, _requestId); } return Task.CompletedTask; diff --git a/VpSharp/src/JoinRequest.cs b/VpSharp/src/JoinRequest.cs index 8590f69..0a06c69 100644 --- a/VpSharp/src/JoinRequest.cs +++ b/VpSharp/src/JoinRequest.cs @@ -80,7 +80,7 @@ public sealed class JoinRequest : IEquatable lock (_client.Lock) { - _ = Native.vp_join_accept(_client.NativeInstanceHandle, _requestId, worldName, x, y, z, (float)yaw, (float)pitch); + _ = NativeMethods.vp_join_accept(_client.NativeInstanceHandle, _requestId, worldName, x, y, z, (float)yaw, (float)pitch); } return Task.CompletedTask; @@ -93,7 +93,7 @@ public sealed class JoinRequest : IEquatable { lock (_client.Lock) { - _ = Native.vp_join_decline(_client.NativeInstanceHandle, _requestId); + _ = NativeMethods.vp_join_decline(_client.NativeInstanceHandle, _requestId); } return Task.CompletedTask; diff --git a/VpSharp/src/VirtualParadiseClient.Avatars.cs b/VpSharp/src/VirtualParadiseClient.Avatars.cs index 975dc5a..2ece26c 100644 --- a/VpSharp/src/VirtualParadiseClient.Avatars.cs +++ b/VpSharp/src/VirtualParadiseClient.Avatars.cs @@ -2,7 +2,7 @@ using System.Collections.Concurrent; using System.Numerics; using VpSharp.Entities; using VpSharp.Internal.NativeAttributes; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp; diff --git a/VpSharp/src/VirtualParadiseClient.Native.cs b/VpSharp/src/VirtualParadiseClient.Native.cs index 70981a7..ccd85e6 100644 --- a/VpSharp/src/VirtualParadiseClient.Native.cs +++ b/VpSharp/src/VirtualParadiseClient.Native.cs @@ -15,7 +15,7 @@ public sealed partial class VirtualParadiseClient private void Initialize() { - var reason = (ReasonCode)Native.vp_init(); + var reason = (ReasonCode)NativeMethods.vp_init(); if (reason == ReasonCode.VersionMismatch) { throw new VersionMismatchException(); @@ -30,7 +30,7 @@ public sealed partial class VirtualParadiseClient _netConfig.Send = Connection.SendNative; _netConfig.Timeout = Connection.TimeoutNative; - NativeInstanceHandle = Native.vp_create(ref _netConfig); + NativeInstanceHandle = NativeMethods.vp_create(ref _netConfig); SetNativeEvents(); SetNativeCallbacks(); diff --git a/VpSharp/src/VirtualParadiseClient.NativeCallbacks.cs b/VpSharp/src/VirtualParadiseClient.NativeCallbacks.cs index a722040..ac35395 100644 --- a/VpSharp/src/VirtualParadiseClient.NativeCallbacks.cs +++ b/VpSharp/src/VirtualParadiseClient.NativeCallbacks.cs @@ -1,7 +1,7 @@ using System.Collections.Concurrent; using VpSharp.Entities; using VpSharp.Internal; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp; diff --git a/VpSharp/src/VirtualParadiseClient.NativeEvents.cs b/VpSharp/src/VirtualParadiseClient.NativeEvents.cs index dc7f207..fcf7441 100644 --- a/VpSharp/src/VirtualParadiseClient.NativeEvents.cs +++ b/VpSharp/src/VirtualParadiseClient.NativeEvents.cs @@ -8,7 +8,7 @@ using VpSharp.EventData; using VpSharp.Exceptions; using VpSharp.Internal; using VpSharp.Internal.NativeAttributes; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp; diff --git a/VpSharp/src/VirtualParadiseClient.Objects.cs b/VpSharp/src/VirtualParadiseClient.Objects.cs index 1642047..592ff3b 100644 --- a/VpSharp/src/VirtualParadiseClient.Objects.cs +++ b/VpSharp/src/VirtualParadiseClient.Objects.cs @@ -5,7 +5,7 @@ using VpSharp.Entities; using VpSharp.Exceptions; using VpSharp.Internal; using VpSharp.Internal.NativeAttributes; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp; diff --git a/VpSharp/src/VirtualParadiseClient.Users.cs b/VpSharp/src/VirtualParadiseClient.Users.cs index 5e5df9c..286d9af 100644 --- a/VpSharp/src/VirtualParadiseClient.Users.cs +++ b/VpSharp/src/VirtualParadiseClient.Users.cs @@ -1,6 +1,6 @@ using System.Collections.Concurrent; using VpSharp.Entities; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp; diff --git a/VpSharp/src/VirtualParadiseClient.Worlds.cs b/VpSharp/src/VirtualParadiseClient.Worlds.cs index a2e6c35..66bb6a3 100644 --- a/VpSharp/src/VirtualParadiseClient.Worlds.cs +++ b/VpSharp/src/VirtualParadiseClient.Worlds.cs @@ -1,7 +1,7 @@ using System.Collections.Concurrent; using System.Threading.Channels; using VpSharp.Entities; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp; diff --git a/VpSharp/src/VirtualParadiseClient.cs b/VpSharp/src/VirtualParadiseClient.cs index 10e41e3..6528031 100644 --- a/VpSharp/src/VirtualParadiseClient.cs +++ b/VpSharp/src/VirtualParadiseClient.cs @@ -10,7 +10,7 @@ using VpSharp.Exceptions; using VpSharp.Internal; using VpSharp.Internal.NativeAttributes; using VpSharp.Internal.ValueConverters; -using static VpSharp.Internal.Native; +using static VpSharp.Internal.NativeMethods; namespace VpSharp; diff --git a/VpSharp/src/WorldSettingsBuilder.cs b/VpSharp/src/WorldSettingsBuilder.cs index 1221f49..d1b9616 100644 --- a/VpSharp/src/WorldSettingsBuilder.cs +++ b/VpSharp/src/WorldSettingsBuilder.cs @@ -392,7 +392,7 @@ public sealed class WorldSettingsBuilder continue; } - var reason = (ReasonCode)Native.vp_world_setting_set(_client.NativeInstanceHandle, key, value, session); + var reason = (ReasonCode)NativeMethods.vp_world_setting_set(_client.NativeInstanceHandle, key, value, session); if (reason == ReasonCode.NotAllowed) {