comparison api/Factories/WarFoundryFactoryFactory.cs @ 17:a99d3b8466ba

Change "CreateFactory" method to "GetFactory" method to allow for caching no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Mon, 26 Jan 2009 20:29:37 +0000
parents 306558904c2a
children
comparison
equal deleted inserted replaced
16:bf518618eb69 17:a99d3b8466ba
43 factories.TryGetValue(cls, out factory); 43 factories.TryGetValue(cls, out factory);
44 44
45 if (factory == null) 45 if (factory == null)
46 { 46 {
47 factory = null; 47 factory = null;
48 MethodInfo method = cls.GetMethod("CreateFactory"); 48 MethodInfo method = cls.GetMethod("GetFactory");
49 49
50 if (method!=null) 50 if (method!=null)
51 { 51 {
52 LogNotifier.Debug(GetType(), "Found CreateFactory method on " + cls.Name); 52 LogNotifier.Debug(GetType(), "Found GetFactory method on " + cls.Name);
53 object temp = method.Invoke(null, new object[]{}); 53 object temp = method.Invoke(null, new object[]{});
54 54
55 if (temp is IWarFoundryFactory) 55 if (temp is IWarFoundryFactory)
56 { 56 {
57 factory = (IWarFoundryFactory)temp; 57 factory = (IWarFoundryFactory)temp;