Ejemplo n.º 1
0
 public virtual Module GetModule(IServer server, CSharpNativeResource cSharpNativeResource,
                                 IBaseBaseObjectPool baseBaseObjectPool,
                                 IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool, IEntityPool <IVehicle> vehiclePool,
                                 IBaseObjectPool <IBlip> blipPool,
                                 IBaseObjectPool <ICheckpoint> checkpointPool, IBaseObjectPool <IVoiceChannel> voiceChannelPool)
 {
     return(new Module(server, cSharpNativeResource, baseBaseObjectPool, baseEntityPool, playerPool, vehiclePool,
                       blipPool, checkpointPool, voiceChannelPool));
 }
Ejemplo n.º 2
0
 public AsyncModule(IServer server, CSharpNativeResource cSharpNativeResource,
                    IBaseBaseObjectPool baseBaseObjectPool, IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool,
                    IEntityPool <IVehicle> vehiclePool,
                    IBaseObjectPool <IBlip> blipPool,
                    IBaseObjectPool <ICheckpoint> checkpointPool,
                    IBaseObjectPool <IVoiceChannel> voiceChannelPool) : base(server, cSharpNativeResource, baseBaseObjectPool,
                                                                             baseEntityPool, playerPool, vehiclePool, blipPool,
                                                                             checkpointPool, voiceChannelPool)
 {
     AltAsync.Setup(this);
 }
Ejemplo n.º 3
0
 public override Core GetCore(IntPtr nativePointer, IntPtr resourcePointer, AssemblyLoadContext assemblyLoadContext, ILibrary library, IBaseBaseObjectPool baseBaseObjectPool,
                              IBaseEntityPool baseEntityPool,
                              IEntityPool <IPlayer> playerPool,
                              IEntityPool <IVehicle> vehiclePool,
                              IBaseObjectPool <IBlip> blipPool,
                              IBaseObjectPool <ICheckpoint> checkpointPool,
                              IBaseObjectPool <IVoiceChannel> voiceChannelPool,
                              IBaseObjectPool <IColShape> colShapePool,
                              INativeResourcePool nativeResourcePool)
 {
     return(new AsyncCore(nativePointer, resourcePointer, assemblyLoadContext, library, baseBaseObjectPool, baseEntityPool, playerPool, vehiclePool, blipPool, checkpointPool, voiceChannelPool, colShapePool, nativeResourcePool));
 }
Ejemplo n.º 4
0
 public virtual Module GetModule(IServer server,
                                 AssemblyLoadContext assemblyLoadContext,
                                 INativeResource cSharpNativeResource,
                                 IBaseBaseObjectPool baseBaseObjectPool,
                                 IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool, IEntityPool <IVehicle> vehiclePool,
                                 IBaseObjectPool <IBlip> blipPool,
                                 IBaseObjectPool <ICheckpoint> checkpointPool, IBaseObjectPool <IVoiceChannel> voiceChannelPool,
                                 IBaseObjectPool <IColShape> colShapePool,
                                 INativeResourcePool nativeResourcePool)
 {
     return(new Module(server, assemblyLoadContext, cSharpNativeResource, baseBaseObjectPool, baseEntityPool, playerPool, vehiclePool,
                       blipPool, checkpointPool, voiceChannelPool, colShapePool, nativeResourcePool));
 }
Ejemplo n.º 5
0
 public AsyncModule(IServer server, AssemblyLoadContext assemblyLoadContext, INativeResource moduleResource,
                    IBaseBaseObjectPool baseBaseObjectPool, IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool,
                    IEntityPool <IVehicle> vehiclePool,
                    IBaseObjectPool <IBlip> blipPool,
                    IBaseObjectPool <ICheckpoint> checkpointPool,
                    IBaseObjectPool <IVoiceChannel> voiceChannelPool,
                    IBaseObjectPool <IColShape> colShapePool,
                    INativeResourcePool nativeResourcePool) : base(server, assemblyLoadContext, moduleResource,
                                                                   baseBaseObjectPool,
                                                                   baseEntityPool, playerPool, vehiclePool, blipPool,
                                                                   checkpointPool, voiceChannelPool, colShapePool, nativeResourcePool)
 {
     AltAsync.Setup(this);
 }
Ejemplo n.º 6
0
 internal MockServer(IntPtr nativePointer, IBaseBaseObjectPool baseBaseObjectPool,
                     IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool,
                     IEntityPool <IVehicle> vehiclePool,
                     IBaseObjectPool <IBlip> blipPool,
                     IBaseObjectPool <ICheckpoint> checkpointPool,
                     IBaseObjectPool <IVoiceChannel> voiceChannelPool)
 {
     this.nativePointer      = nativePointer;
     this.baseBaseObjectPool = baseBaseObjectPool;
     this.baseEntityPool     = baseEntityPool;
     this.playerPool         = playerPool;
     this.vehiclePool        = vehiclePool;
     this.blipPool           = blipPool;
     this.checkpointPool     = checkpointPool;
     this.voiceChannelPool   = voiceChannelPool;
 }
Ejemplo n.º 7
0
 public Module(IServer server, CSharpNativeResource cSharpNativeResource, IBaseBaseObjectPool baseBaseObjectPool,
               IBaseEntityPool baseEntityPool, IEntityPool <IPlayer> playerPool,
               IEntityPool <IVehicle> vehiclePool,
               IBaseObjectPool <IBlip> blipPool,
               IBaseObjectPool <ICheckpoint> checkpointPool,
               IBaseObjectPool <IVoiceChannel> voiceChannelPool)
 {
     Alt.Init(this);
     Server = server;
     CSharpNativeResource = cSharpNativeResource;
     BaseBaseObjectPool   = baseBaseObjectPool;
     BaseEntityPool       = baseEntityPool;
     PlayerPool           = playerPool;
     VehiclePool          = vehiclePool;
     BlipPool             = blipPool;
     CheckpointPool       = checkpointPool;
     VoiceChannelPool     = voiceChannelPool;
 }
Ejemplo n.º 8
0
 public Server(IntPtr nativePointer, INativeResource resource, IBaseBaseObjectPool baseBaseObjectPool,
               IBaseEntityPool baseEntityPool,
               IEntityPool <IPlayer> playerPool,
               IEntityPool <IVehicle> vehiclePool,
               IBaseObjectPool <IBlip> blipPool,
               IBaseObjectPool <ICheckpoint> checkpointPool,
               IBaseObjectPool <IVoiceChannel> voiceChannelPool,
               IBaseObjectPool <IColShape> colShapePool,
               INativeResourcePool nativeResourcePool)
 {
     NativePointer           = nativePointer;
     this.baseBaseObjectPool = baseBaseObjectPool;
     this.baseEntityPool     = baseEntityPool;
     this.playerPool         = playerPool;
     this.vehiclePool        = vehiclePool;
     this.blipPool           = blipPool;
     this.checkpointPool     = checkpointPool;
     this.voiceChannelPool   = voiceChannelPool;
     this.colShapePool       = colShapePool;
     this.nativeResourcePool = nativeResourcePool;
     Resource = resource;
 }
Ejemplo n.º 9
0
        public Server(IntPtr nativePointer, CSharpNativeResource resource, IBaseBaseObjectPool baseBaseObjectPool, IBaseEntityPool baseEntityPool,
                      IEntityPool <IPlayer> playerPool,
                      IEntityPool <IVehicle> vehiclePool,
                      IBaseObjectPool <IBlip> blipPool,
                      IBaseObjectPool <ICheckpoint> checkpointPool,
                      IBaseObjectPool <IVoiceChannel> voiceChannelPool,
                      IBaseObjectPool <IColShape> colShapePool)
        {
            NativePointer           = nativePointer;
            this.baseBaseObjectPool = baseBaseObjectPool;
            this.baseEntityPool     = baseEntityPool;
            this.playerPool         = playerPool;
            this.vehiclePool        = vehiclePool;
            this.blipPool           = blipPool;
            this.checkpointPool     = checkpointPool;
            this.voiceChannelPool   = voiceChannelPool;
            this.colShapePool       = colShapePool;
            var ptr = IntPtr.Zero;

            AltNative.Server.Server_GetRootDirectory(nativePointer, ref ptr);
            RootDirectory = Marshal.PtrToStringUTF8(ptr);
            Resource      = resource;
        }
Ejemplo n.º 10
0
 public Core(IntPtr nativePointer, IntPtr resourcePointer, AssemblyLoadContext assemblyLoadContext, ILibrary library, IBaseBaseObjectPool baseBaseObjectPool,
             IBaseEntityPool baseEntityPool,
             IEntityPool <IPlayer> playerPool,
             IEntityPool <IVehicle> vehiclePool,
             IBaseObjectPool <IBlip> blipPool,
             IBaseObjectPool <ICheckpoint> checkpointPool,
             IBaseObjectPool <IVoiceChannel> voiceChannelPool,
             IBaseObjectPool <IColShape> colShapePool,
             INativeResourcePool nativeResourcePool) : base(nativePointer, library)
 {
     this.assemblyLoadContext   = new WeakReference <AssemblyLoadContext>(assemblyLoadContext);
     this.BaseBaseObjectPool    = baseBaseObjectPool;
     this.BaseEntityPool        = baseEntityPool;
     this.PlayerPool            = playerPool;
     this.VehiclePool           = vehiclePool;
     this.BlipPool              = blipPool;
     this.CheckpointPool        = checkpointPool;
     this.VoiceChannelPool      = voiceChannelPool;
     this.ColShapePool          = colShapePool;
     this.NativeResourcePool    = nativeResourcePool;
     this.vehicleModelInfoCache = new();
     nativeResourcePool.GetOrCreate(this, resourcePointer, out var resource);
     Resource = resource;
 }