//Voegt de gate toe aan de factorylist public void Assign(string name, PrototypeGate gate) { //Alse deze name nog niet bekend is, dan wordt die toegevoegd if (!FactoryList.ContainsKey(name)) { FactoryList.Add(name, gate); } }
private void AddToFactory(Type type) { System.Reflection.MethodInfo[] methods = type.GetMethods(); foreach (System.Reflection.MethodInfo method in methods) { if (method.Name == "GetKey") { PrototypeGate instance = GetGateInstance(type); this.FactoryList.Add(instance.GetKey(), instance); } } }