예제 #1
0
        protected Agent(SystemType systemType, IEnumerable <string> agentComments, string revision = "")
        {
            AgentCommentsList = agentComments.ToList();
            var systemFactory = new SystemFactory();

            SystemDescription = systemFactory.CreateSystem(systemType, revision);
        }
예제 #2
0
        static void Main(string[] args)
        {
            string input = Console.ReadLine();

            List <Component> components = new List <Component>();

            while (input != "System Split")
            {
                try
                {
                    Component component = SystemFactory.CreateSystem(input);
                    components.Add(component);
                }
                catch (Exception)
                {
                }

                if (input == "Analyze()")
                {
                    Analyze analyze = new Analyze();
                    foreach (var component in components)
                    {
                        if (component.Type == "Power" || component.Type == "Heavy")
                        {
                            analyze.hardware.Add((Hardware)component);
                        }

                        if (component.Type == "Express" || component.Type == "Light")
                        {
                            analyze.software.Add((Software)component);
                        }
                    }

                    Console.WriteLine(analyze);
                }

                input = Console.ReadLine();
            }

            if (input == "System Split")
            {
                Console.WriteLine(components.Count);
            }
        }
예제 #3
0
 public IOutputFileHelper CreateOutputFileHelper(string outputDirectory)
 {
     return(new OutputFileHelper(outputDirectory, SystemFactory.CreateSystem()));
 }