Builder Design pattern

string assemblyName = ConfigurationSettings["BuilderAssembly"];
string builderName = ConfigurationSettings["BuilderClass"];

Assembly assembly = Assembly.Load(assemblyName);

Type t = assembly.GetType(builderName);

Builder builder = Activator.CreateInstance(t);

House house = GameManager.CreateHouse(builder);
相關文章
相關標籤/搜索