Note that in this example, there is no mixed class
DessertWax (derived from
FloorWaxMixin). The mixed class is created by the
ObjectFactory as soon as needed, upon first instantiation of our mixed class for the dessert wax.
Looking at the type (
GetType () of the instance from
ObjectFactory will unearth a type name with a GUID, something like
This complicated name invented by the
ObjectFactory is not important, however, because you are not supposed to ever use it in your source code. The class only gives the .NET run-time something to work with, something to instantiate.
This derived class is cached; if you instantiate the mixed dessert topping/floor wax again, the
ObjectFactory will pull it from the cache. In other words, in
myOtherDessertWax will have the same type as
this particular run of the program. (The GUID will change from run to run, however.)
Since the mixed class you will eventually use at run-time is derived (sub-classed) from the target class and the mixin classes, you can't extend a sealed class or primitive types like
int with re-motion mixin.