This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void Main(string[] args) | |
| { | |
| Console.Title = "TPL Dataflow"; | |
| var source = new[] { | |
| "elemarjr", "leandronet", "vquaiato", | |
| "juanplopes", "rodrigovidal", "cleytonferrari", | |
| "diogodamiani", "sricanesh", "rodrigokono" | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void Main(string[] args) | |
| { | |
| Console.Title = "TPL Dataflow"; | |
| var source = new[] { | |
| "elemarjr", "leandronet", "vquaiato", | |
| "juanplopes", "rodrigovidal", "cleytonferrari", | |
| "diogodamiani", "sricanesh", "rodrigokono" | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void Main(string[] args) | |
| { | |
| Console.Title = "TPL Dataflow"; | |
| var source = new[] { | |
| "elemarjr", "leandronet", "vquaiato", | |
| "juanplopes", "rodrigovidal", "cleytonferrari", | |
| "diogodamiani", "sricanesh", "rodrigokono" | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ab.Post("This message will be processed"); | |
| ab.Complete(); | |
| ab.Post("This message will never be processed"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void Main(string[] args) | |
| { | |
| Console.Title = "TPL Dataflow"; | |
| var source = new[] { | |
| "elemarjr", "leandronet", "vquaiato", | |
| "juanplopes", "rodrigovidal", "cleytonferrari", | |
| "diogodamiani", "sricanesh", "rodrigokono" | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void Main(string[] args) | |
| { | |
| Console.Title = "TPL Dataflow"; | |
| var source = new[] { | |
| "elemarjr", "leandronet", "vquaiato", | |
| "juanplopes", "rodrigovidal", "cleytonferrari", | |
| "diogodamiani", "sricanesh", "rodrigokono" | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Roslyn.Compilers; | |
| using Roslyn.Scripting.CSharp; | |
| using Roslyn.Scripting; | |
| namespace Roslyn_CTP2012 | |
| { | |
| static class Program | |
| { | |
| static void Main(string[] args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /******************************************************************************* | |
| * Copyright (c) 2001-2012 Mathew A. Nelson and Robocode contributors | |
| * All rights reserved. This program and the accompanying materials | |
| * are made available under the terms of the Eclipse Public License v1.0 | |
| * which accompanies this distribution, and is available at | |
| * http://robocode.sourceforge.net/license/epl-v10.html | |
| * | |
| * Contributors: | |
| * Mathew A. Nelson | |
| * - Initial implementation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [TestMethod] | |
| public void Ctor_PassingOutput_ShouldCallWrite() | |
| { | |
| var invoked = false; | |
| var stub = new StubIOutput() | |
| { | |
| WriteLogEntry = (entry) => | |
| { | |
| invoked = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface IOutput | |
| { | |
| void Write(LogEntry message); | |
| } |