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)); }
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); }
public bool GetOrCreate(IntPtr corePointer, IntPtr resourcePointer, out INativeResource resource) { if (resourcePointer == IntPtr.Zero) { resource = default; return(false); } if (resources.TryGetValue(resourcePointer, out resource)) { return(true); } resource = resourceFactory.Create(corePointer, resourcePointer); resources[resourcePointer] = resource; return(true); }
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; }
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; }
void IInternalCore.InitResource(INativeResource resource) { }