From b3c1a9a929d5f57e3c760087ec9e9950bd1e7aff Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Tue, 5 May 2020 21:32:08 -0400 Subject: move example projects into a subfolder --- Examples/Tokens/Program.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Examples/Tokens/Program.cs (limited to 'Examples/Tokens/Program.cs') diff --git a/Examples/Tokens/Program.cs b/Examples/Tokens/Program.cs new file mode 100644 index 0000000..c3a0885 --- /dev/null +++ b/Examples/Tokens/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using IrcTokens; + +namespace TokensSample +{ + public class Program + { + public static void Main(string[] args) + { + // tokenization + var line = new Line("@id=123 :ben!~ben@hostname PRIVMSG #channel :hello there!"); + Console.WriteLine(line); + Console.WriteLine(line.Format()); + + // formatting + var line2 = new Line {Command = "USER", Params = new List {"user", "0", "*", "real name"}}; + Console.WriteLine(line2); + Console.WriteLine(line2.Format()); + + // stateful example + var client = new Client(); + client.Start(); + } + } +} -- cgit 1.4.1