C# Class Fusion.Engine.Common.GameModule

Inheritance: System.DisposableBase
Datei anzeigen Open project: demiurghg/FusionEngine Class Usage Examples

Public Methods

Method Description
GameModule ( Game game ) : System

Constructor

GetConfiguration ( ) : IEnumerable

Gets configuration as collection of KeyData. Derived classes can replace this to customize what to save into configuration.

GetConfigurationProperties ( ) : IEnumerable

Gets all properties marked with ConfigAttribute.

GetConfigurationProperty ( string name ) : PropertyInfo

Gets all properties marked with ConfigAttribute.

Initialize ( ) : void

Intializes module.

Invoke ( System.Action action ) : void

Pushes action to the invoke queue.

SetConfiguration ( IEnumerable configuration ) : void

Sets module configuration from collection of KeyData. Derived classes can replace this to customize how to load configuration.

Protected Methods

Method Description
Dispatch ( ) : void

Calls all actions pushed to invoke queue.

Private Methods

Method Description
DisposeAll ( object rootObj ) : void

Calls 'Initialize' method on all services starting from top one tree.

Enumerate ( object rootObj ) : IEnumerable

Enumerates all modules and submodules in BFS order.

GetModuleBindings ( object parentModule ) : IEnumerable

Gets module binding for each module declared in parentModule.

InitRecursive ( ModuleBinding root, string prefix ) : void

Perform recursive module initialization.

InitializeAll ( object rootObj ) : void

Calls 'Initialize' method on all modules starting from top one tree.

PrintModuleNames ( ) : void

Prints module names.

VerifyServiceThread ( ) : void

Method Details

Dispatch() protected method

Calls all actions pushed to invoke queue.
protected Dispatch ( ) : void
return void

GameModule() public method

Constructor
public GameModule ( Game game ) : System
game Game
return System

GetConfiguration() public method

Gets configuration as collection of KeyData. Derived classes can replace this to customize what to save into configuration.
public GetConfiguration ( ) : IEnumerable
return IEnumerable

GetConfigurationProperties() public method

Gets all properties marked with ConfigAttribute.
public GetConfigurationProperties ( ) : IEnumerable
return IEnumerable

GetConfigurationProperty() public method

Gets all properties marked with ConfigAttribute.
public GetConfigurationProperty ( string name ) : PropertyInfo
name string
return System.Reflection.PropertyInfo

Initialize() public abstract method

Intializes module.
public abstract Initialize ( ) : void
return void

Invoke() public method

Pushes action to the invoke queue.
public Invoke ( System.Action action ) : void
action System.Action
return void

SetConfiguration() public method

Sets module configuration from collection of KeyData. Derived classes can replace this to customize how to load configuration.
public SetConfiguration ( IEnumerable configuration ) : void
configuration IEnumerable
return void