public BugzillaProperties GetBugzillaProperties(BugzillaProfile profile, PluginProfileErrorCollection errors) { profile.ValidateCredentials(errors); if (!errors.Any()) { try { _logger.Info("Checking connection"); var bugzillaProperties = new BugzillaService().CheckConnection(profile); _logger.Info("Connection success"); return new BugzillaProperties(bugzillaProperties); } catch (BugzillaPluginProfileException e) { e.ErrorCollection.ForEach(errors.Add); _logger.WarnFormat("Connection failed: {0}", e); } } return null; }
public BugzillaProperties GetBugzillaProperties(BugzillaProfile profile, PluginProfileErrorCollection errors) { profile.ValidateCredentials(errors); if (!errors.Any()) { try { _logger.Info("Checking connection"); var bugzillaProperties = new BugzillaService().CheckConnection(profile); _logger.Info("Connection success"); return(new BugzillaProperties(bugzillaProperties)); } catch (BugzillaPluginProfileException e) { e.ErrorCollection.ForEach(errors.Add); _logger.WarnFormat("Connection failed: {0}", e); } } return(null); }