PackContainer ​
A class that loads and manages a game pack instance.
Kind: Class
Namespace: CrowdControl.Games
Inheritance: IDisposable → IEffectCallbacks
Public Member Functions
void
Clean up any resources being used.
void
Unload the domain containing the assembly
bool
Load the pack assembly and create an instance of the pack.
bool
Load the pack assembly and create an instance of the pack.
Task
Tries to load a connector of the specified type.
bool
Checks if the loaded pack is of the specified type.
bool
Tries to get the current state of the loaded pack as a JSON string.
bool
Tries to get the current state of the loaded pack as a JSON string.
bool
Tries to set the state of the loaded pack from a JSON string.
bool
Tries to set the state of the loaded pack from a JSON string.
Public Static Functions
bool
Checks if the provided assembly bytes are a valid pack assembly.
PackContainer
Loads an assembly from a byte array.
Properties
byte[]
AssemblyData
[get, ]
The assembly data of the loaded pack.
AssemblyLoadContext
Context
[get, ]
The assembly load context for the loaded pack.
Assembly
Assembly
[get, ]
The assembly of the loaded pack.
AssemblyName
AssemblyName
[get, ]
The name of the loaded pack assembly.
List
Packs
[get, ]
The list of pack names in the loaded assembly.
EffectPack
LoadedPack
[get, ]
The loaded pack instance.
Type
PackType
[get, ]
The type of the loaded pack.
Func
Receiver
[get, set]
The method to call when a message is received from the game.
IGUIProvider
DialogProvider
[get, set]
The GUI provider for the loaded pack.
bool
TestMode
[get, set]
Set to true to run the pack in test mode, which allows for testing without CrowdControl.Games.PackContainer.Receiver being set.
IGameConnector
Connector
[get, ]
List
MenuActions
[get, ]
Get the list of menu actions available in the loaded pack.
ValueTuple
LastConnectionState
[get, ]
The most recent connection state emitted by the connector.
Events
Action<CrowdControlBlock>
MessageReceived
Called when a message is received from the game.
EventHandler
ConnectorReady
Called when the connector is ready.
Action<string>
ConnectionError
Called when a connection error occurs.
EventHandler<ValueTuple<ConnectionStatus, string>>
ConnectionStatusChanged
Called when the connection status of the connector changes.
EventHandler<PackStatus>
PackStateChanged
Called when the effect pack state changes.
EventHandler<GameState>
GameStateChanged
Called when the game state changes.
Action<IEnumerable<KeyValuePair<string, object>>>
MetadataChanged
Called when the game metadata changes.
Action<EffectRequest>
OnEffect
Called when an effect is requested.
Action<EffectRequest, SITimeSpan>
OnEffectStart
Called when an effect is started.
Action<EffectRequest>
OnEffectStop
Called when an effect is stopped.
Action<EffectRequest>
OnEffectPause
Called when an effect is paused.
Action<EffectRequest, SITimeSpan>
OnEffectResume
Called when an effect is resumed.
Action<EffectRequest>
OnEffectQueue
Called when an effect is queued.
Action<EffectRequest>
OnEffectDequeue
Called when an effect is dequeued.
Action
OnStopAllEffects
Called when all effects are stopped.
Action<string, string, IEnumerable<string>>
OnEffectDataDesynchronized
Called when the effect data is desynchronized.
Action<VersionNumber>
RemoteVersionReceived
Called when the remote mod version is received.
