Class SharedStatic
Shared export class for the plugin.
This shared static class contains necessary methods for the plugin and has been a part of v0.1 API Standard.
public class SharedStatic
- Inheritance
-
SharedStatic
- Derived
- Inherited Members
Fields
InstanceLogger
public static readonly ILogger InstanceLogger
Field Value
LibraryStandardVersion
public static readonly GameVersion LibraryStandardVersion
Field Value
Properties
PluginLocaleCode
public static string PluginLocaleCode { get; }
Property Value
Methods
Load<TPlugin>(GameVersion)
Specify which IPlugin instance to load and use in this plugin.
protected static void Load<TPlugin>(GameVersion interceptDllVersionTo = default) where TPlugin : class, IPlugin, new()
Parameters
interceptDllVersionToGameVersion
Type Parameters
TPluginA member of COM Interface of IPlugin.
TryGetApiExportPointer(char*, void**)
Retrieve the pointer of the API exports from the lookup table.
public static int TryGetApiExportPointer(char* apiExportName, void** delegateP)
Parameters
apiExportNamechar*[In] The name of the key for the delegate pointer.
delegatePvoid**[Out] The pointer to the delegated function.
Returns
- int
0if it's been registered. Otherwise, MinValue if not registered or ifapiExportNameis undefined/null.
TryRegisterApiExport<T>(string, T)
Registers the API exports to the lookup table.
public static bool TryRegisterApiExport<T>(string apiExportName, T callback) where T : notnull
Parameters
apiExportNamestringThe name of the key for the delegate pointer.
callbackTThe callback of the function.
Returns
- bool
Trueif it's added.Falseif the same export name is already registered.
Type Parameters
TThe type of the delegate of the function.