2020-04-28 04:44:58 +00:00
|
|
|
|
using System;
|
2020-05-15 03:06:10 +00:00
|
|
|
|
using IRCTokens;
|
2020-04-22 15:42:09 +00:00
|
|
|
|
|
2021-02-26 05:09:40 +00:00
|
|
|
|
namespace Tokens
|
2020-04-22 15:42:09 +00:00
|
|
|
|
{
|
|
|
|
|
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
|
2020-05-06 14:39:59 +00:00
|
|
|
|
var line2 = new Line("USER", "user", "0", "*", "real name");
|
2020-04-22 15:42:09 +00:00
|
|
|
|
Console.WriteLine(line2);
|
|
|
|
|
Console.WriteLine(line2.Format());
|
|
|
|
|
|
|
|
|
|
// stateful example
|
|
|
|
|
var client = new Client();
|
|
|
|
|
client.Start();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|