IInterfaceManager
Interface IInterfaceManager
Namespace: SwiftlyS2.Shared
Assembly: SwiftlyS2.CS2.dll
public interface IInterfaceManagerMethods
AddSharedInterface<TInterface, TImpl>(string, TImpl)
Add a keyed shared interface for other plugin to use. The interface must be defined in the contracts dll.
void AddSharedInterface<TInterface, TImpl>(string key, TImpl implInstance) where TInterface : class where TImpl : class, TInterfaceParameters
- key string — The key of the interface.
- implInstance TImpl — The implementation of the interface.
Type Parameters
- TInterface — The interface to add.
- TImpl — The implementation of the interface.
GetSharedInterface<TInterface>(string)
Get a shared interface.
TInterface GetSharedInterface<TInterface>(string key) where TInterface : classParameters
- key string — The key of the interface.
Returns
- TInterface — The implementation of the interface.
Type Parameters
- TInterface — The interface to get.
HasSharedInterface(string)
Check if a shared interface exists.
bool HasSharedInterface(string key)Parameters
- key string — The key of the interface.
Returns
- bool — True if the interface exists, false otherwise.