Beispiel #1
0
 //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);
     }
 }
Beispiel #2
0
        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);
                }
            }
        }