Bin() public méthode

public Bin ( ) : string
Résultat string
Exemple #1
2
        public static void report(StringWriter output, IList<Machine> machines, Robot robot)
        {
            output.Write("<h1>FACTORY REPORT</h1>\n");

            IEnumerator<Machine> line = machines.GetEnumerator();
            while (line.MoveNext())
            {
                Machine machine = line.Current;
                output.Write("<h2>" + machine.Name() + "</h2>\n");
                output.Write("<ul>\n");
                output.Write("<li>location = " + machine.Location() + "</li>\n");

                if (machine.Bin() != null)
                    output.Write("<li>bin containing " + machine.Bin() + "</li>\n");
                else
                    output.Write("<li>no bin</li>\n");

                output.Write("</ul>\n");
            }

            output.Write("<h2>Robot</h2>\n<ul>\n");
            if (robot.Location() != null)
                output.Write("<li>location = " + robot.Location().Name() + "</li>\n");

            if (robot.Bin() != null)
                output.Write("<li>bin containing " + robot.Bin() + "</li>\n");

            output.Write("</ul>\n");
        }
Exemple #2
0
        public static void report(StringWriter output, IList <Machine> machines, Robot robot)
        {
            output.Write("FACTORY REPORT\n");

            IEnumerator <Machine> line = machines.GetEnumerator();

            while (line.MoveNext())
            {
                Machine machine = line.Current;
                output.Write("Machine " + machine.Name());

                if (machine.Bin() != null)
                {
                    output.Write(" bin=" + machine.Bin());
                }

                output.Write("\n");
            }
            output.Write("\n");

            output.Write("Robot");
            if (robot.Location() != null)
            {
                output.Write(" location=" + robot.Location().Name());
            }

            if (robot.Bin() != null)
            {
                output.Write(" bin=" + robot.Bin());
            }

            output.Write("\n");

            output.Write("========\n");
        }
Exemple #3
0
        public static void report(StringWriter output, IList <Machine> machines, Robot robot)
        {
            output.Write("<h1>FACTORY REPORT</h1>\n");

            IEnumerator <Machine> line = machines.GetEnumerator();

            while (line.MoveNext())
            {
                Machine machine = line.Current;
                output.Write("<h2>" + machine.Name() + "</h2>\n");
                output.Write("<ul>\n");
                output.Write("<li>location = " + machine.Location() + "</li>\n");

                if (machine.Bin() != null)
                {
                    output.Write("<li>bin containing " + machine.Bin() + "</li>\n");
                }
                else
                {
                    output.Write("<li>no bin</li>\n");
                }

                output.Write("</ul>\n");
            }

            output.Write("<h2>Robot</h2>\n<ul>\n");
            if (robot.Location() != null)
            {
                output.Write("<li>location = " + robot.Location().Name() + "</li>\n");
            }

            if (robot.Bin() != null)
            {
                output.Write("<li>bin containing " + robot.Bin() + "</li>\n");
            }

            output.Write("</ul>\n");
        }