Doesn't seem like C# provides a way to do static type initialization on startup without using reflection.
-
-
Replying to @AxiomVerge
@AxiomVerge also pinging@renaudbedard ? had a blast with Mono several times he might just have the answer.(brain on Ramadan strike :p)1 reply 0 retweets 1 like -
Replying to @KhalilArafan
@KhalilArafan@AxiomVerge hmm not off the top of my head. Though any static access would initialize the type, a dummy method/getter would do1 reply 0 retweets 1 like -
Replying to @renaudbedard
@renaudbedard@KhalilArafan It's to have creatures auto-add themselves to the factory without editing the factory :( Think I need reflection2 replies 0 retweets 1 like -
Replying to @AxiomVerge
@AxiomVerge Just use an attribute to mark the creatures. Then have the factory look them up by attribute during initialization.1 reply 0 retweets 0 likes
@tomspilman Yeah, I was about to use Assembly.GetExecutingAssembly().GetTypes()) combined with Attribute.GetCustomAttribute(type...)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.