Mixin for classes that support extensions.
It just provides a simple container for extensions (ordered in the order provided by BaseExtension.order()) registering of extensions, and getting an extension based on its type.
Typical usage:
interface ISomeExtension : IExtension { void someMethod ( ); } class SomeExtensibleClass { mixin ExtensibleClassMixin!(ISomeExtension); void something ( ) { foreach (ext; this.extensions) { ext.someMethod(); } } }
TODO: Assert that ExtensionClass is derived from IExtension
Get an extension based on its type.
Register a new extension, keeping extensions list sorted.
List of extensions. Will be kept sorted by extension order when using the registerExtension() method.
See Implementation
Mixin for classes that support extensions.
It just provides a simple container for extensions (ordered in the order provided by BaseExtension.order()) registering of extensions, and getting an extension based on its type.
Typical usage:
TODO: Assert that ExtensionClass is derived from IExtension