private void InitializeLeanKitMonitoring() { try { var host = ConfigurationManager.AppSettings["LeanKit-AccountName"]; var email = ConfigurationManager.AppSettings["LeanKit-EmailAddress"]; var password = ConfigurationManager.AppSettings["LeanKit-Password"]; var boardIds = ConfigurationManager.AppSettings["LeanKit-BoardId"]; var leanKitAuth = new LeanKitBasicAuth { Hostname = host, Username = email, Password = password }; var boardId = int.Parse(boardIds); _leanKitIntegration = new LeanKitIntegrationFactory().Create(boardId, leanKitAuth); _leanKitIntegration.BoardChanged += IntegrationOnBoardChanged; _leanKitIntegration.StartWatching(); } catch (Exception ex) { ShowMessage("Error: " + ex.Message); } }
internal BoardSubscription(LeanKitAccountAuth auth, long boardId) { _boardId = boardId; LkClientApi = new LeanKitClientFactory().Create(auth); Integration = new LeanKitIntegrationFactory().Create(_boardId, auth); new Thread(WatchThread).Start(); }
internal BoardSubscription(ILeanKitAccountAuth auth, long boardId, int pollingFrequency) { _boardId = boardId; LkClientApi = new LeanKitClientFactory().Create(auth); var settings = new IntegrationSettings {CheckForUpdatesIntervalSeconds = pollingFrequency}; Integration = new LeanKitIntegrationFactory().Create(_boardId, auth, settings); new Thread(WatchThread).Start(); }
internal BoardSubscription(LeanKitAccountAuth auth, long boardId, int pollingFrequency) { _boardId = boardId; LkClientApi = new LeanKitClientFactory().Create(auth); var settings = new IntegrationSettings { CheckForUpdatesIntervalSeconds = pollingFrequency }; Integration = new LeanKitIntegrationFactory().Create(_boardId, auth, settings); new Thread(WatchThread).Start(); }