Table of Contents

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

settings JsonSettings

Fields

_modules

protected readonly List<Module> _modules

Field Value

List<Module>

Properties

Modules

public IReadOnlyList<Module> Modules { get; }

Property Value

IReadOnlyList<Module>

Methods

Attach(Module)

Attach a module to current socket.

public void Attach(Module t)

Parameters

t Module

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

args object[]

The arguments that'll be passed to the constructor

Returns

T

Type Parameters

T

A 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

t Module

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

checker Func<Module, bool>

Returns

bool

IsAttachedOfType(Type)

public bool IsAttachedOfType(Type t)

Parameters

t Type

Returns

bool

IsAttachedOfType<T>()

public bool IsAttachedOfType<T>() where T : Module

Returns

bool

Type Parameters

T