public void Init() { // Now I dont need to pass this empEstate = this.CreateBuilding <EmpEstate>(); setSomeProperty(empEstate); // now any one cannot create building in new your and // say it belongs to Philedelphia :) nyTimes = this.CreateBuilding <NYTimes>(); }
//Using the IrcDotNet IRC client library. //Code based on sample from here: https://github.com/IrcDotNet/IrcDotNet/blob/develop/samples/IrcDotNet.Samples.TwitchChat/Program.cs static void Main(string[] args) { var nytimes = new NYTimes(); var chatClient = new TwitchChatClient(nytimes); chatClient.Connect(); Console.ReadKey(); }
static void Main(string[] args) { INews newsAggre = new NYTimes(); IChatbot chatbot = new ConsoleChatbot(newsAggre); while (true) { string msg = Console.ReadLine(); chatbot.RecognizeCmd(msg); } }