/// <summary> /// Initializes a new instance of the <see cref="SkypeClient"/> class and immediatly starts it. /// </summary> /// <param name="logger"> /// The logger. /// </param> public SkypeClient(ILogger logger) { // Starting bot and attaching it to the skype app. this.skype = new Skype(); this.skype.Attach(7, false); if (!this.skype.Client.IsRunning) { this.skype.Client.Start(true, true); } // Initialiazing skype bot. this.logger = logger; this.contactsManager = new ContactsManager(this.skype); this.dataManager = new DataManager(); this.commandManager = new CommandManager(this.dataManager, this); this.messageParser = new MessageParser(); this.skype.MessageStatus += this.OnMessageReceived; this.skype.UserAuthorizationRequestReceived += this.OnAuthorizationRequestReceived; }
/// <summary> /// The run parse test. /// </summary> /// <param name="inputMessage"> /// The input message. /// </param> /// <returns> /// The <see cref="ISkypeCommand"/>. /// </returns> private ISkypeCommand RunParseTest(string inputMessage) { var parser = new MessageParser(); return parser.ParseMessage(inputMessage, this.fakeDirectCommands, this.fakeReplaceCommands, false); }