26 lines
650 B
C#
26 lines
650 B
C#
using System;
|
|
using IRCTokens;
|
|
|
|
namespace Tokens
|
|
{
|
|
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("USER", "user", "0", "*", "real name");
|
|
Console.WriteLine(line2);
|
|
Console.WriteLine(line2.Format());
|
|
|
|
// stateful example
|
|
var client = new Client();
|
|
client.Start();
|
|
}
|
|
}
|
|
}
|