Class ModuleSocket
- Namespace
- Nucs.JsonSettings.Modulation
- Assembly
- Nucs.JsonSettings.dll
A subclass to manage modulation of a JsonSettings
public class ModuleSocket : ISocket, IDisposable
- Inheritance
-
ModuleSocket
- Implements
- Inherited Members
Constructors
ModuleSocket(JsonSettings)
public ModuleSocket(JsonSettings settings)
Parameters
settingsJsonSettings
Fields
_modules
protected readonly List<Module> _modules
Field Value
Properties
Modules
public IReadOnlyList<Module> Modules { get; }
Property Value
Methods
Attach(Module)
Attach a module to current socket.
public void Attach(Module t)
Parameters
tModule
Attach<T>(params object[])
Will invoke attach to a freshly new object of type T.
public T Attach<T>(params object[] args) where T : Module
Parameters
argsobject[]The arguments that'll be passed to the constructor
Returns
- T
Type Parameters
TA module class
Deattach(Module)
Deattach a module from any socket it was attached to.
This is merely a shortcut to Deattach(JsonSettings).
public void Deattach(Module t)
Parameters
tModule
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetModule<T>()
public T GetModule<T>() where T : Module
Returns
- T
Type Parameters
T
GetModules<T>()
public IEnumerable<T> GetModules<T>() where T : Module
Returns
- IEnumerable<T>
Type Parameters
T
IsAttached(Func<Module, bool>)
public bool IsAttached(Func<Module, bool> checker)
Parameters
Returns
IsAttachedOfType(Type)
public bool IsAttachedOfType(Type t)
Parameters
tType
Returns
IsAttachedOfType<T>()
public bool IsAttachedOfType<T>() where T : Module
Returns
Type Parameters
T