/// <summary>
        /// Initializes a new instance of the <see cref="CommandManager"/> class.
        /// </summary>
        /// <param name="dataManager">
        /// The state manager.
        /// </param>
        /// <param name="messageSender">
        /// The message sender.
        /// </param>
        public CommandManager(DataManager dataManager, ISkypeMessageSender messageSender)
        {
            this.messageSender = messageSender;
            this.dataManager = dataManager;

            // Initializing commands.
            this.commonCommands = new List<AbstractDirectCommand>
                                      {
                                          new OnCommand(dataManager), 
                                          new OffCommand(dataManager), 
                                          new JsCommand(), 
                                          new RandomGuyCommand(), 
                                          new SubCommand(dataManager),
                                          new UnsubCommand(dataManager),
                                          new FeedbackCommand(dataManager)
                                      };

            this.UpdateData();

            var timer = new Timer(this.OnNotifyTimerElapsed);
            timer.Change(0, NotifyTimerPeriod);
        }
        /// <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>
 /// Initializes a new instance of the <see cref="SubCommand"/> class.
 /// </summary>
 /// <param name="dataManager">
 /// The data manager.
 /// </param>
 public SubCommand(DataManager dataManager)
 {
     this.dataManager = dataManager;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FeedbackCommand"/> class.
 /// </summary>
 /// <param name="dataManager">
 /// The data manager.
 /// </param>
 public FeedbackCommand(DataManager dataManager)
 {
     this.dataManager = dataManager;
 }