forked from FabianTerhorst/coreclr-module
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibrary.cs
More file actions
42 lines (34 loc) · 1.29 KB
/
Library.cs
File metadata and controls
42 lines (34 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System.Runtime.CompilerServices;
using AltV.Net.CApi.Libraries;
using AltV.Net.Native;
#pragma warning disable CS8618
[assembly: InternalsVisibleTo("AltV.Net")]
[assembly: InternalsVisibleTo("AltV.Net.Shared")]
[assembly: InternalsVisibleTo("AltV.Net.Client")]
[assembly: InternalsVisibleTo("AltV.Net.Mock")]
[assembly: InternalsVisibleTo("AltV.Net.Mock2")]
[assembly: InternalsVisibleTo("AltV.Net.Async")]
namespace AltV.Net.CApi
{
public delegate bool EventCallback(IntPtr eventPointer, IntPtr userData);
public delegate void TickCallback(IntPtr userData);
public delegate void CommandCallback(StringView cmd, StringViewArray args, IntPtr userData);
public interface ILibrary
{
public IClientLibrary Client { get; }
public IServerLibrary Server { get; }
public ISharedLibrary Shared { get; }
}
public class Library : ILibrary
{
public IClientLibrary Client { get; }
public IServerLibrary Server { get; }
public ISharedLibrary Shared { get; }
public Library(Dictionary<ulong, IntPtr> funcTable, bool client)
{
Shared = new SharedLibrary(funcTable);
if (client) Client = new ClientLibrary(funcTable);
else Server = new ServerLibrary(funcTable);
}
}
}