mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-10 02:55:41 +00:00
Rename Native - > NativeMethods
This commit is contained in:
parent
0f0d756925
commit
74ddc12f9d
@ -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;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using VpSharp.Internal;
|
||||
using VpSharp.Internal.NativeAttributes;
|
||||
using static VpSharp.Internal.Native;
|
||||
using static VpSharp.Internal.NativeMethods;
|
||||
|
||||
namespace VpSharp.Entities;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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";
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using VpSharp.Entities;
|
||||
using static VpSharp.Internal.Native;
|
||||
using static VpSharp.Internal.NativeMethods;
|
||||
|
||||
namespace VpSharp;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user