ircsharp/Examples/Tokens/Program.cs

26 lines
656 B
C#
Raw Normal View History

2020-04-28 04:44:58 +00:00
using System;
using IrcTokens;
2020-04-22 15:42:09 +00:00
namespace TokensSample
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();
}
}
}