예제 #1
0
        private void AddTypesToBuilderFactory()
        {
            Dictionary <string, string> circuitNodes = fileData.FileDictionary;

            foreach (KeyValuePair <string, string> circuitNode in circuitNodes)
            {
                Type t;
                if (ci.ContainsKey(circuitNode.Key))
                {
                    if (ci[circuitNode.Key] == "PROBE")
                    {
                        t = typeof(OutputBuilder);
                    }
                    else
                    {
                        t = typeof(InputBuilder);
                    }

                    builderFactory.AddBuilderType(circuitNode.Key, t, ci);
                }
                else
                {
                    t = Type.GetType("CircuitSimulator.Builder." + circuitNode.Value + "Builder");

                    builderFactory.AddBuilderType(circuitNode.Value, t, null);
                }
            }
        }