1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-10 02:35:42 +00:00

Rename Native - > NativeMethods

This commit is contained in:
Oliver Booth 2022-11-30 19:09:01 +00:00
parent 0f0d756925
commit 74ddc12f9d
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
18 changed files with 21 additions and 21 deletions

View File

@ -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;

View File

@ -1,6 +1,6 @@
using VpSharp.Internal;
using VpSharp.Internal.NativeAttributes;
using static VpSharp.Internal.Native;
using static VpSharp.Internal.NativeMethods;
namespace VpSharp.Entities;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);
}
}
}

View File

@ -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";

View File

@ -81,7 +81,7 @@ public sealed class InviteRequest : IEquatable<InviteRequest>
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<InviteRequest>
{
lock (_client.Lock)
{
_ = Native.vp_invite_decline(_client.NativeInstanceHandle, _requestId);
_ = NativeMethods.vp_invite_decline(_client.NativeInstanceHandle, _requestId);
}
return Task.CompletedTask;

View File

@ -80,7 +80,7 @@ public sealed class JoinRequest : IEquatable<JoinRequest>
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<JoinRequest>
{
lock (_client.Lock)
{
_ = Native.vp_join_decline(_client.NativeInstanceHandle, _requestId);
_ = NativeMethods.vp_join_decline(_client.NativeInstanceHandle, _requestId);
}
return Task.CompletedTask;

View File

@ -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;

View File

@ -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();

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,6 +1,6 @@
using System.Collections.Concurrent;
using VpSharp.Entities;
using static VpSharp.Internal.Native;
using static VpSharp.Internal.NativeMethods;
namespace VpSharp;

View File

@ -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;

View File

@ -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;

View File

@ -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)
{