示例#1
0
 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>();
 }
示例#2
0
        //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();
        }
示例#3
0
        static void Main(string[] args)
        {
            INews    newsAggre = new NYTimes();
            IChatbot chatbot   = new ConsoleChatbot(newsAggre);

            while (true)
            {
                string msg = Console.ReadLine();
                chatbot.RecognizeCmd(msg);
            }
        }