コード例 #1
0
        public CircuitData GetCircuit()
        {
            string errorMessage = null;

            AddTypesToBuilderFactory();
            MakeBuilderList();

            NodeComponent circuit =
                circuitDirector.BuildCircuit(builderList, fileData.EdgeDictonary, fileData.FileDictionary, ci);

            bool noError = circuit.InfiniteloopCheck();

            if (!noError)
            {
                errorMessage = "Infinite loop detected";
            }
            else
            {
                noError = circuit.NotConnectedCheck(true);
                if (!noError)
                {
                    errorMessage = "Not Connected Detected";
                }
            }

            return(new CircuitData(noError, errorMessage, circuit));
        }