Craig's Utility Library
4.0 Beta
|
Public Member Functions | |
Factory () | |
Constructor More... | |
virtual T | Create (Key Key) |
Creates an instance associated with the key More... | |
virtual bool | Exists (Key Key) |
Determines if a key has been registered More... | |
virtual void | Register (Key Key, T Result) |
Registers an item More... | |
virtual void | Register (Key Key, Func< T > Constructor) |
Registers an item More... | |
Properties | |
Dictionary< Key, Func< T > > | Constructors [get] |
List of constructors/initializers More... | |
Factory class
Key | The "message" type |
T | The class type that you want created |
Definition at line 32 of file Factory.cs.
Utilities.DataTypes.Patterns.Factory< Key, T >.Factory | ( | ) |
Constructor
Definition at line 37 of file Factory.cs.
|
virtual |
Creates an instance associated with the key
Key | Registered item |
Definition at line 52 of file Factory.cs.
|
virtual |
Determines if a key has been registered
Key | Key to check |
Definition at line 62 of file Factory.cs.
|
virtual |
Registers an item
Key | Item to register |
Result | The object to be returned |
Definition at line 72 of file Factory.cs.
|
virtual |
Registers an item
Key | Item to register |
Constructor | The function to call when creating the item |
Definition at line 82 of file Factory.cs.
|
getprotected |
List of constructors/initializers
Definition at line 45 of file Factory.cs.